Mathematical Problems in Engineering

Volume 2017, Article ID 1921479, 10 pages

https://doi.org/10.1155/2017/1921479

## Solving the Time-Jerk Optimal Trajectory Planning Problem of a Robot Using Augmented Lagrange Constrained Particle Swarm Optimization

State Key Laboratory of Robotics and System, Harbin Institute of Technology, Harbin 150006, China

Correspondence should be addressed to Jingdong Zhao; nc.ude.tih@920809b11

Received 15 February 2017; Accepted 10 May 2017; Published 15 June 2017

Academic Editor: Luciano Mescia

Copyright © 2017 Shaotian Lu et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

The problem of minimum time-jerk trajectory planning for a robot is discussed in this paper. The optimal objective function is composed of two segments along the trajectory, which are the proportional to the total execution time and the proportional to the integral of the squared jerk (which denotes the derivative of the acceleration). The augmented Lagrange constrained particle swarm optimization (ALCPSO) algorithm, which combines the constrained particle swarm optimization (CPSO) with the augmented Lagrange multiplier (ALM) method, is proposed to optimize the objective function. In this algorithm, falling into a local best value can be avoided because a new particle swarm is generated per initial procedure, and the best value gained from the former generation is saved and delivered to the next generation during the iterative search procedure to enable the best value to be found more easily and more quickly. Finally, the proposed algorithm is tested on a planar 3-degree-of-freedom (DOF) robot; the simulation results show that the algorithm is effective, offering a solution to the time-jerk optimal trajectory planning problem of a robot under nonlinear constraints.

#### 1. Introduction

Trajectory planning is the foundation of robot trajectory control. The aim of trajectory planning is to generate trajectory points and plan a smooth trajectory. Optimal trajectory planning has been a focus of robot research studies in recent years because its performance is important for the efficiency and motion stability of a robot. The major steps in optimal trajectory planning are as follows. First, several points along a given geometric path are given. Then, the inverse kinematic solutions of the given trajectory points are obtained. Next, interpolating functions are used to perform trajectory planning in the joint space. Finally, an optimal method is used to optimize the trajectory in order to make it smooth and continuous. Boundary condition constraints, such as those on the velocity, acceleration, jerk, and time, need to be considered in the optimization procedure.

Reasonable trajectory planning can reduce vibration and ensure the long joint life and high path tracking accuracy of a robot. The minimum-time trajectory planning approach was first proposed in the literature to improve the efficiency of robots; the study of such planning has become an important field in trajectory optimization. The purpose of minimum-time trajectory planning is to plan the shortest execution time trajectory according to the given points while the boundary constraints are satisfied. Examples of minimum-time trajectory planning are provided in [1–5]. In fact, vibration may appear when a robot is in the moving process or when it is stopped, which will negatively impact the tracking accuracy of the robot; therefore, minimum vibration is an important performance index, and many researchers have studied how to utilize minimum-jerk trajectory planning to reduce vibration [6–8]. The minimum-time and minimum-jerk trajectory planning studies are often considered together to improve the efficiency and smoothness of the trajectory and reduce the vibration of a robot; the combination of these two methods is referred to as time-jerk optimal trajectory planning. Examples of such trajectory planning are provided in [9–13].

In the many aforementioned optimal trajectory planning studies, the main research procedure can be summarized as follows. First, the optimal objective function is transformed into a mathematic expression. Second, relational optimization methods are adopted to optimize the mathematic expression. Finally, the optimal results are compared, and a conclusion is reached considering the requirements. Currently, the major interpolated functions used in joint space include cubic splines and fifth-order B-splines, and the major optimal methods include genetic algorithms, PSO, and the sequential quadratic programming (SQP) strategies. The current literature regarding time-jerk optimal trajectory planning suffers from two problems. First, few studies have been performed on this topic, and further in-depth study is required. Second, because optimal trajectory planning is an optimization problem with constraints, the penalty function method is typically used when considering these issues. In the penalty function method, in certain cases, the nonlinear constrained problem can only converge to the optimal solution when the penalty factor becomes infinitely large (according to the exterior penalty function method) or infinitely small (according to the interior penalty function method). Moreover, a large number of tests need to be performed to determine a reasonable initial penalty factor. Therefore, although some optimal algorithms adopted in the prior literature have been improved, it is difficult to achieve a balance in terms of the quality and efficiency of the optimal solution because of the condition restrictions.

This paper proposes a new approach for time-jerk optimal trajectory planning in order to increase the efficiency and reduce the vibration of the robot. The new approach, named augmented Lagrange constrained particle swarm optimization (ALCPSO), combines the constriction factor method from the basic PSO algorithm with the ALM. In contrast to previous research, a new particle swarm is generated for each initial procedure of the PSO; this process can avoid falling into the local best value, and the best value of the prior generation is saved and delivered to the next generation during the iterative search for procedure to allow the best value to be found more easily and quickly. This approach enables the best value to be obtained even for finite penalty factors. The new approach does not require an accurate dynamic model or a continuously differentiable objective function; thus, it has stronger robustness.

The remainder of this paper is organized as follows. The minimum time-jerk trajectory planning problem is described in Section 2. Application of the technique based on the CPSO and ALM methods to solve the nonlinear constrained optimization problem is described in Section 3. Section 4 presents the simulation results of the ALCPSO algorithm. Section 5 presents the conclusions of this study.

#### 2. The Minimum Time-Jerk Trajectory Planning Problem

The optimal trajectory planning premise of this paper is that the geometric path has been given. Thus, the joint space position points corresponding to the discrete operative space (Cartesian space) can be obtained according to inverse kinematics; subsequently, the joint trajectory of the robot can also be obtained via the polynomial or the cubic splines method by connecting the relevant position points. The use of cubic splines in trajectory planning is ordinary because the generated trajectories have continuous acceleration values. In addition, in contrast to higher-order polynomials, the cubic splines can overcome excessive oscillations and overshoot problems between any pair of reference points. In this paper, we implement the joint trajectory planning by utilizing the cubic splines described in [10, 11, 14]. The trajectory planning performance depends largely on the objective function. The objective function [9] is defined as follows:

In (1), , through adjusting the values of and to allow the total execution time and jerk effect to reach the optimum. Because the total execution time and the proportional to the integral of the squared jerk may have a large difference in quantity grade, the elastic coefficient is introduced to balance the effects of them. The meanings of the symbols in (1) are presented in the Symbols.

Therefore, the optimal trajectory planning problem under constraints can be solved by using (1) to search for the optimum solution of time interval .

#### 3. Solving the Nonlinear Constrained Optimization Problem

References [15–17] presented the PSO algorithm, which is a theory that explains the origins of the performance of individuals for bird flocks or fish schools about their collective behavior. The ALM method has numerous advantages, such as its numerical stability and calculated efficiency surpassing the penalty function.

##### 3.1. Constrained Particle Swarm Optimization

In [18, 19], the constriction factor *χ* of PSO was introduced to ensure the convergence of the PSO as follows:

The particle velocity and position of the PSO are updated as follows:In (2), researchers commonly define and set ; thus, becomes 4.1 and . In (3), denotes the number of iterations; and are nonnegative values named acceleration factors; and are two random values distributed in the range ; describes the individual best position; describes the global best position. Now, the PSO can be referred to as the constrained particle swarm optimization (CPSO) algorithm, which can realize an effective balance between the global search and the local search.

##### 3.2. Augmented Lagrange Multiplier (ALM) Method

The ALM method is similar to the Lagrange multiplier method; however, in contrast to the latter, the former does not require many tests to determine a reasonable initial penalty factor, and the dynamic penalty factor does not tend to infinity; that is, the former surpasses the latter in terms of numerical stability and computational efficiency [20–22]. For general inequality constraints, the optimization model can be described as

Its ALM method can be defined as follows:where denotes the independent variable, denotes the objective function, denotes the inequality constraints, denotes the Lagrange multiplier, and denotes the penalty factor. is described as follows:

The solution of the original constrained problem (4) can be obtained by solving (5). The Lagrange multiplier iterative formula is expressed aswhere denotes the number of times that the Lagrange multiplier is updated. The penalty factor updated formula is expressed as follows:where denotes the constraint error accuracy.

When , the termination criterions are as follows:

When , the termination criterions are defined as follows: where denotes the convergence accuracy and denotes the update maximal times.

The ALM method can guarantee that the optimal solution can be found when the penalty factor does not reach infinity, which cannot be guaranteed by either the interior or the exterior penalty function method.

##### 3.3. Augmented Lagrange Constrained Particle Swarm Optimization (ALCPSO) Algorithm

Because the CPSO and ALM enjoy their respective advantages, in this paper, we propose an algorithm named ALCPSO algorithm which combines the CPSO with the ALM in order to make use of their respective advantages to provide a new approach for solving nonlinear constrained optimization problems. Time-jerk optimal trajectory planning is such a problem. The ALCPSO algorithm comprises the following steps.

*[ALCPSO1]*. Set , , , , , , , , and . Transform the constrained problem (4) into the unconstrained problem (5).

*[ALCPSO2]*. Initialize particles with randomly chosen positions and velocities and evaluate the corresponding fitness values at each position.

*[ALCPSO3]*. Check the termination criterions (9). If they are satisfied, the algorithm terminates with the best value ; if they are not satisfied, the obtained best value is saved. Initialize particles with randomly chosen positions and velocities and set .

*[ALCPSO4]*. Utilize the obtained best value of former generation to replace one group of particles.

*[ALCPSO5]*. Apply (3) to update the particles, evaluate the corresponding fitness values at each position, and find the best .

*[ALCPSO6]*. Check the updated number of times of the Lagrange multiplier/penalty factor. If it is satisfied, check the termination criterions (10); if the termination criterions (10) are satisfied, the best value is obtained; if they are not satisfied, update the Lagrange multipliers and the penalty factors according to (7) and (8) and set . If the updated number of times of the Lagrange multiplier/penalty factor is not satisfied, proceed with step [ALCPSO5].

In this algorithm, a new particle swarm is freshly generated in each initial procedure to avoid falling into the local best value, and the best value can be found more easily and quickly because the best value of the prior generation is saved and delivered to the next generation during the iterative search for procedure.

#### 4. Trajectory Planning Simulation and Discussion

Before optimizing the robot’s trajectory, its inverse kinematics should be obtained. In [23, 24], the configuration control approach is proposed to solve the inverse kinematics of the redundant robot; this approach ensures that the inverse kinematics is unique and enables the robot to perform cyclic motion, which is an essential requirement for repetitive operations. Moreover, this approach requires little computational time, making it particularly favorable for the real-time control of a redundant robot. In this paper, we use the damped least squares (DLS) of the configuration control approach to determine the inverse kinematics of a redundant robot. Its formulation can be written in the following form: where *W* is a symmetric positive-definite weighting matrix, , where and are symmetric positive-definite weighting matrices in accordance with the basic task and an additional task, respectively; is a symmetric positive-definite weighting matrix; is a positive scalar constant; is a symmetric positive-definite feedback gain (constant); is error, .

Next, the position solution of inverse kinematics can be obtained by integrating (11). We use the proposed ALCPSO method to perform a trajectory planning simulation of a robot to verify the accuracy and reliability of the method. The program is compiled in Matlab™ R2014. The test object is a space robot under the condition that the position and pose of the associated carrying platform are under control; it is a 3-DOF planar robot shown in Figure 2. The tested mission is tracking a circular path in plane. In Figure 1, , , and are joint angles. The robot geometric parameters are defined as = 2,080 mm, = 2,080 mm, and = 430 mm. Because the robot has a redundant degree of freedom, the configuration control approach is utilized to determine its inverse kinematics. The initial position of the end effector is (4000, 0) (mm), with corresponding joint angles of (30°, −49.03°, −38.27°), and the radius and the center of the track circle are 400 mm and (3600, 0) (mm), respectively. The following procedure is used to obtain the inverse kinematics of the robot:(1)Set the planned trajectory points in the circular path as a function of time , mean , which is used to plan the desired trajectory points.(2)Choose as the additional task.(3)Let ].(4)Put the corresponding values into (11) and perform integration to obtain the position solution of inverse kinematics.