Abstract
Due to the fact that intelligent algorithms such as Particle Swarm Optimization (PSO) and Differential Evolution (DE) are susceptible to local optima and the efficiency of solving an optimal solution is low when solving the optimal trajectory, this paper uses the Sequential Quadratic Programming (SQP) algorithm for the optimal trajectory planning of a hydraulic robotic excavator. To achieve high efficiency and stationarity during the operation of the hydraulic robotic excavator, the trade-off between the time and jerk is considered. Cubic splines were used to interpolate in joint space, and the optimal time-jerk trajectory was obtained using the SQP with joint angular velocity, angular acceleration, and jerk as constraints. The optimal angle curves of each joint were obtained, and the optimal time-jerk trajectory planning of the excavator was realized. Experimental results show that the SQP method under the same weight is more efficient in solving the optimal solution and the optimal excavating trajectory is smoother, and each joint can reach the target point with smaller angular velocity, and acceleration change, which avoids the impact of each joint during operation and conserves working time. Finally, the excavator autonomous operation becomes more stable and efficient.
Introduction
Hydraulic excavators are widely used in extremely harsh environments for mining, transportation, and civil engineering.1,2 However, the following problems persist regarding the process of work: (1) the high intensity of labor required from the operators, (2) a dangerous working environment, and (3) the large amounts of money, material resources, and time required for an operator to develop the requisite skill. Thus, unmanned excavators have gradually replaced manually operated ones.3,4 Intelligent excavators can be used for submarine operations and earthquake relief work as well as at nuclear power plants. Improving the operating efficiency and reliability of the excavator is an important research subject. Trajectory planning is the premise and foundation for realizing control of the excavation trajectory. An appropriately planned trajectory enables quick and smooth completion of the excavation task. In particular, a large jerk value for each joint during operation results in unsmooth motion, which has a significant negative impact on the hydraulic cylinder. This also reduces the service life of the machine and damages the equipment.5–8
To ensure the speed and stability of excavator in independent operation, the planning of time-jerk optimal excavation trajectory has become a research hot-spot. In the trajectory planning method with optimal time or smoothing as the goal, Liu et al. 9 applied interpolation in joint space using B-splines and also employed SQP for optimizing the minimum time trajectory. However, they did not consider the adverse effects of larger jerk on the work equipment. Boryga and Graboś 10 used a high-order polynomial with only one unknown parameter to achieve time-optimal trajectory planning but presupposed that the maximum acceleration value of the terminal endpoint moving along the path must be given. Elnagar and Hussein 11 used the numerical iterative method to obtain the optimal trajectory of a robot in energy consumption in a 3D environment with certain boundary conditions. Lin et al. 12 projected the minimum time trajectory of an industrial robot by using a polyhedron search. By imposing constraints on velocity, acceleration, and jerk, cubic splines have been used to interpolate optimal trajectory in the joint space. Piazzi and Visioli 13 proposed interval analysis, which requires presetting the total time of the trajectory in order to obtain the optimal trajectory. Gasparetto and Zanotto, 14 Gasparetto et al., 15 and Zanotto et al. 16 used cubic splines to plan a multi-objective optimal trajectory and verified it for a robot through experimentation. Wang et al. 17 uses the Beetle Swarm algorithm to optimize the minimum time and joint rotation angle optimal trajectory. Zhang et al. 18 solved the problem of non-convex global optimal trajectory planning and produced an efficient and continuous trajectory. For the point-to-point optimal trajectory planning problem, Wang et al. 19 obtained the point-to-point time optimal trajectory based on the expression of interpolation in the form of multiple roots. However, each joint obtained by the solution does not synchronously reach the limits of their allowable angular velocity, acceleration, and jerk. Qian et al. 20 improved the B-spline interpolation method and optimal the time-jerk trajectory. Fang et al.21,22 use the sigmoid piecewise function and the improved sinusoidal function to achieve interpolation. According to the given angular velocity, acceleration, and jerk constraints of each joint, they acquired the synchronized motion curve. Zhao et al. 23 solve the optimal trajectory planning with time-jerk as the optimization objective based on the optimal control method. In addition, an optimal trajectory was planned by considering the hybrid objective of optimizing time, energy, and jerk.24,25 During this process, the robots efficiency, stability, and energy consumption of the robot during the operation were comprehensively considered. Kim et al. 26 regarded velocity and acceleration as given values to optimize time-torque trajectory planning of the hydraulic excavator. Xiao et al. 27 used cubic splines to fit joint angles in joint space to conduct online form time-optimal trajectory planning for industrial robots.
In this paper, the Lipai PC1012 hydraulic robotic excavator is taken as the research object. To ensure the efficiency and stability of the excavator in the working process, this paper takes the angular velocity, angular acceleration, and jerks as the constraints, and uses the SQP, PSO, 28 and DE 29 algorithms to optimize the time-jerk optimal cubic spline interpolation trajectory. The experimental results show that the mining trajectory obtained by the SQP algorithm is more efficient and smooth, and the SQP algorithm more efficient to obtain the optimal solution.
The remainder of this paper is organized as follows. Section 2 briefly introduces joint trajectory using cubic spline parameterization. Section 3 establishes the optimization model of the multi-objective function and the process of using SQP algorithm optimization is introduced. Section 4 simulates the trajectory planning problem using different weight coefficients and also analyzed the optimal trajectory obtained through SQP, DE, and PSO optimization. Finally, Section 5 summarizes the conclusions.
Parameterized trajectory using cubic splines
Cubic spline interpolation is a universal method that can ensure the succession of acceleration in trajectory planning, and the obtained trajectory is smoother and continuous. Compared with the NURBS interpolation method, 30 the calculation amount and complexity of the cubic spline are small. And it can also help avoid Runge’s phenomenon that results in excessive oscillations and collisions in the case of high-order polynomial interpolation. In this paper, cubic splines are used for optimal trajectory planning in joint space.
Taking the
By integrating equation (1) twice with respect to the given boundary conditions
The expressions for joint velocity were obtained by calculating the first derivative of equation (2). Based on the conditions of continuous joint velocity through each interpolation point, the relation among the interpolation time interval, joint displacement, and acceleration can be obtained as follows.
where
Modeling and trajectory optimization
To improve the efficiency of completing a given task, Wang et al. 29 took time as the optimization goal and conducts time-optimal trajectory planning and to improve the smoothness of the trajectory, Lu et al. 31 took jerk as the performance index to obtain a smooth optimal trajectory. While Huang et al. 24 comprehensively considers multiple factors and establishes a multi-objective trajectory planning. So in this paper, to ensure the efficient and smooth motion of each joint, the problems of time and jerk were considered simultaneously for determining the optimal trajectory. The optimal objective function is as follows.
In equation (7), the first item is the total time needed to complete the task, which is related to efficiency. The second item is the total jerk at each joint, which is related to the problem of smoothness. The
It can be seen from equations (3)–(7) that the parameters to be solved in the expression are closely related to the interpolation time of each segment of the excavation path when calculating the cubic spline expression. The SQP is used to find the optimal value of each interpolation time. When each optimal interpolation time can be optimized, the expression of the joint angle curve can be obtained. Through time-jerk optimal trajectory planning, the excavator can reach the target point with a small range of angle changes in the actual moving process, so as to realize the completion of the excavation task in a short time and ensure the smooth operation of each joint in the working process to the servo control of the control system. By limiting the angular velocity, acceleration, and jerk of each joint in the process of moving, the negative effect on the hydraulic cylinder can be avoided in the process of operation.
The time intervals
In addition to considering the lower bound, the values of
Based on the values of
The trajectory planning problem is a nonlinear optimization problem. This problem is transformed into the Quadratic Programming (QP) problem to solve it using SQP. Through Taylor expansion, the objective function can be reduced to a quadratic function at the iteration point
where
The specific steps for solving the optimization problems are as follows and the corresponding flowchart is shown in Figure 1.
Step 1: Solve
Step 2: Simplify point
Step 3: Solve the QP problem and consider
Step 4: Execute the constrained one dimensional search of the objective function along the direction
Step 5: If
Step 6: Modify the Hessian matrix
where

Optimization flowchart of SQP algorithm.
Simulation and analysis of results
The PC1012 hydraulic robotics excavator is used as a research object, shown in Figure 2.

The PC1012 hydraulic robotic excavator.
According to the D-H coordinate system method, 32 the excavator working device model is established, as shown in Figure 3. The relevant D-H parameters are listed in Table 1. This method expresses the transformation relationship between the coordinate systems by deriving the homogeneous transformation matrix between the coordinate systems. In Figure 3, the transformation matrix between the link joints is
where
where
D-H parameters of the PC1012 excavator.

Mode of the excavator in the D-H coordinate system.
Set the position and posture coordinate point of the tip of the bucket as
where
In Table 1, joint 1 represents the rotary platform, joint 2 is the boom, joint 3 is the arm, and joint 4 is the bucket.
Due to the limited range of the driving mechanism, according to the limited range of the angles of each joint in Table 1, without considering rotation

Working space of the PC1012 excavator.
This paper takes digging as an example and selects the excavation path point in the working range allowed by the working device of the excavator. The mining path points are directly given by the coordinate points at the end of the bucket tooth tip, while the trajectory is planned according to the corresponding angle values of each joint. Therefore, the coordinate value of the path point must be converted into the angle value of each joint corresponding to the coordinate point. This process realizes the conversion from the coordinate space to the joint space through the inverse kinematics solution. According to equation (16), the analytical method is used to obtain the joint angle values of the boom, arm, and bucket corresponding to the excavation path point. And the corresponding results are shown in Table 2.
Conversion of control point from Cartesian space into joint space.
There are two extra points in Table 2. They are not given and merely applied to satisfy the continuous condition of velocity and acceleration. Its expressions are as follows.
In the process of obtaining the optimal solution, the constraint conditions of joint angular velocity, acceleration, and jerk are shown in Table 3.
Physical constraints of the PC1012 excavator.
Under the same constraint conditions, SQP, PSO, and DE algorithms are used successively to optimize the best trajectory of time-jerk under different weight coefficients. The optimization results are shown in Table 4. In the same configuration conditions, Table 5 shows the time taken to find the best trajectory of the time-jerk of the cubic spline curve using these three algorithms.
Optimal value results.
The time of obtaining the optimal solution.
When

The
Substituting the optimal solution corresponding to
The expressions of the boom
The first and second derivatives of the equations (19)–(27) are acquired to obtain the change curves of the angle joint, velocity, acceleration, and jerk of each joint, as shown in Figures 6 to 8.

The

The

The
It can be seen from Figures 6 to 8 that the cubic spline interpolation function uses SQP, PSO, and DE to find the optimal interpolation time that satisfies the constraints and obtains the smooth and continuous curves of the joint angle, velocity, and acceleration which velocity, acceleration, and jerk are within the constrained range. This shows that these three algorithms can be used to optimize the trajectory of the excavator under certain constraints. Secondly, it can be seen from Figure 5 that when only the efficiency problem is considered, although the time to complete the task is short, the jerk value of each joint is large compared to Figures 6 to 8.
For the time-jerk optimal joint angle curve obtained by the optimal solution, the corresponding joint angle value can be obtained from the corresponding time. Therefore, in the optimal joint angle curve obtained by the above optimization solution, under the premise that the time is known, substitute the optimal joint angle value of

Comparison diagram of mining path.

The first and fourth mining trajectories: (a) the first sections of the mining trajectory and (b) the fourth sections of the mining trajectory.
Conclusions and Summary
In this paper, the joint trajectory planning problem of hydraulic robotics excavators is studied. Firstly, the performance indexes considering both jerk and time are established, and the optimal cubic spline interpolation trajectory concerning the problems of time and jerk are obtained by using the three algorithms of the SQP, PSO, and DE. The results of the time-jerk optimal trajectory solution and the efficiency of obtaining the optimal solution show that the optimal trajectory of time obtained by the SQP under the same weight coefficient is the shortest, and the jerk value is relatively small. The results of this experiment show that it can beneficial to reduce the impact and vibration in the process of motion, ensure the smooth continuity of the trajectory and the stability of the movement, improve the tracking accuracy of the trajectory, but also can protect the mechanical structure, reduce mechanical wear, prolong the service life of the equipment.
Secondly, the experimental results show that the greater the weight of time is, the greater the jerk value of each joint will be in the optimization process. Conversely, the greater the weight of the jerk, the longer the time it takes to complete a given task. Therefore, in engineering applications, the problems of time and jerk should both be considered, according to the given circumstances.
In further research, the existence of obstacles must be considered in the process of trajectory planning, perfect the actual working environment of hydraulic excavators, and improve the equipment’s ability to work autonomously in complex environments.
Footnotes
Handling Editor: James Baldwin
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) received no financial support for the research, authorship, and/or publication of this article.
