A Hierarchical Structure Control Strategy Based on MPC for a Six-DOF Flexible Joint Manipulator

The six-degree-of-freedom ﬂexible joint manipulator is a complex system that suﬀers from the problem that the trajectory planning results are inconsistent with the control results. To keep the planned trajectory within the control range of the manipulator, a hierarchical structure control strategy is designed, which consists of a trajectory planning layer, a model predictive control layer, and a bottom control layer. Speciﬁcally, ﬁrst, the target joint angles are obtained by a time-optimal trajectory planning algorithm based on a genetic algorithm in the trajectory planning layer. Second, in the model predictive control layer, considering the system physical constraints, the model predictive controller is adopted to provide the set points for the Pro-portion-Diﬀerentiation (PD) controllers. Finally, in the bottom control layer, the manipulator moves along the target trajectory under the PD controllers with the feedback control law. The simulation results show that, compared with the PD control strategy, the hierarchical structure control strategy can achieve better control performance and reduce the tracking error of the terminal trajectory by 33.70%.


Introduction
A flexible joint manipulator is light and small and consumes little energy, making this technology widely used in aerospace, medical, industrial assembly, and other fields [1,2]. In practical applications, to meet different mission requirements, it is necessary to optimize the trajectory of the manipulator and implement precise control. Many achievements have been made in the trajectory planning and control implementation of manipulator systems [3,4]. However, the existing results of manipulator control do not consider the consistency between the trajectory optimization results and the control results; that is, the trajectory optimization results may not be feasible in the control implementation.
e "hierarchical structure" approach is mainly used to deal with "multiperiod, multiobjective, multilevel model and optimization" complex systems in industrial production [5,6]. In the hierarchical structure, each level has its own division of labour, which makes complex problems easy to deal with [7]. e 6-DOF flexible joint manipulator control strategy is designed for industrial hierarchical structure systems [8]. Figure 1 compares the traditional control structure in the process industry and the hierarchical control structure designed in this paper (where FC, PC, TC, and LC represent flow, pressure, temperature, and liquid level control, resp.). e right portion indicates the basic components of the hierarchical structure, which consist of the trajectory planning layer, the MPC layer, and the bottom control layer. Compared with the existing hierarchical structure in the industry, the main function of the trajectory planning layer is to obtain the target trajectory, the MPC layer makes the terminal trajectory of the manipulator approximate the target trajectory, and the bottom control layer implements the final control.
Trajectory planning is the basis of manipulator motion control. When the trajectory planning of a manipulator is carried out, it is usually possible to maximally optimize some of the indicators while satisfying the given constraints. ere are many research results in trajectory planning, among which the time-optimal trajectory planning algorithm of manipulators is studied more [9,10]. e position, velocity, acceleration, second-order acceleration, and other motion constraints of the manipulator are taken as the premise, and a higher-order polynomial is taken as the curve path between the path points [11]. However, the calculation of higher degree polynomials is complex. Bazaz et al. use the timeoptimal trajectory planning method based on cubic spline interpolation, which is widely used and simple to calculate [12]. Because of the low order of the cubic spline interpolation function, the acceleration of the manipulator is discontinuous. e 3-5-3 polynomial interpolation is used to plan the trajectory of a manipulator [13]. Time-optimal trajectory planning is a nonlinear dynamic optimization problem. e constraints are generally nonlinear, the calculation process is complex, and the calculation amount is large. For the optimization of such problems, 3-5-3 polynomial interpolation has no optimization attribute. It can be solved by an intelligent optimization algorithm, such as particle swarm optimization algorithm, artificial neural network algorithm, ant colony algorithm, and simulated annealing algorithm. ese algorithms have advantages and disadvantages in the application of the robot trajectory optimization process [14][15][16]. At present, the genetic algorithm is the most possible general algorithm for trajectory planning and optimization. For example, L. Tian et al. propose the GA method, which is an effective optimization method for the trajectory planning of robot manipulators. e GA method can find an optimal trajectory for the robot even in a complicated environment [16]. erefore, in this chapter, the optimal time in the process of manipulator motion is taken as the objective function, the path and the maximum angular velocity are taken as the constraints, and the genetic algorithm is used to optimize the interpolation time and time. e optimal trajectory planning method is designed. e flexible joint manipulator is a multivariable, highly nonlinear complex system with strong coupling, which has uncertainties, including parameter perturbation and external interference. e complexity of the system makes designing a control strategy difficult. erefore, the problem of manipulator motion control has become an area of active research in recent years. PID control has been widely used in the control of manipulators because the approach is simple, flexible, and independent of the system model and shows other advantages [17,18]. However, with the increasingly complex structure of manipulators, the PID controller method has been unable to meet the ever-increasing demand for control performance [19][20][21]. erefore, a more efficient control strategy needs to be designed. Considering that the multidegree-of-freedom (DOF) manipulator is composed of several joints, model predictive control (MPC) can be applied to manipulator control [22]. For example, a real-time motion control strategy for the manipulator based on the constraint MPC is proposed in [23], which can control the achieved target position under the condition of physical constraints. A robust hierarchical multiloop method is proposed in [24]. e sliding mode control and MPC are used to design the internal and external loops, respectively. e optimal evolution of the manipulator control trajectory is guaranteed. e effectiveness of three control strategies based on sliding mode control, torque control, and MPC is compared, and MPC has the best control effect [25]. In general, considering the advantages of MPC, such as explicit constraints and flexible design of objective functions, it is obvious that its application in manipulator control is expanding.
However, the MPC approach requires much computation and yields a slow response speed, and it is not easy to control the multi-DOF manipulator. A PD controller has good dynamic performance and a faster response speed than the model predictive controller. erefore, in the hierarchical structure control strategy designed in this paper, the set points obtained by the model predictive controller are sent to the PD controller.
To summarize, the hierarchical structure control strategy, that is, a control strategy of "trajectory planning layer + MPC layer + bottom control layer" for the 6-DOF  flexible joint manipulator, is designed. Among the layers, the trajectory planning layer is designed to obtain the target trajectory based on a GA, the MPC layer makes the terminal trajectory of the manipulator approach the target trajectory, and the bottom control layer realizes the final control. e main contributions of this paper are as follows: (1) based on the appropriate assumptions in [26], a 6-DOF flexible joint model is established, and a dynamics model of a flexible joint manipulator is built based on a simplification of the Lagrange equation; (2) referring to the industrial hierarchical structure system, a hierarchical structure control strategy of a 6-DOF flexible joint manipulator is designed; and (3) the control strategy, which includes the trajectory planning layer, the MPC layer, and the bottom control layer, realizes stable operation of the manipulator under the optimal trajectory. e organization of this paper is as follows. In Section 2, the dynamics model and state space model of the flexible joint manipulator are established. In Section 3, a time-optimal 3-5-3 polynomial interpolation trajectory planning method based on a GA is designed in the trajectory planning layer. Two controllers, the model predictive controller in the MPC layer and the PD controller in the bottom control layer, are designed in Section 4. In Section 5, the hierarchical structure control strategy is tested and analyzed, and Section 6 gives the conclusions of this paper.

The 6-DOF Flexible Joint Manipulator Model
e dynamics of the manipulator are very important in the control of manipulator. e dynamic model of the manipulator is the premise of the high-performance control strategy design. In this chapter, the Lagrange method is used to establish the dynamic equation of the manipulator.

Dynamics Modelling.
e manipulator joint is composed of a power unit (motor), a transmission (reducer), a shaft, and a sensor. e model of the flexible link manipulator is complex, and the influence of flexibility on the motion performance is small. erefore, the link flexibility is ignored, and the subject is simplified as a flexible joint manipulator. Spong suggested that the spring stiffness coefficient be used to describe the characteristics of flexible joints [26]. For the flexible joint in Figure 2, the following two assumptions are made during the modelling process.

Assumption 1.
e link flexibility is ignored, and only the joint flexibility is considered.

Assumption 2.
A flexible joint is a linear spring between the motor rotor and a link. e relationship ( Figure 2) between joint torque and stiffness coefficient can be stated as follows: where i � 1, 2, . . . , 6 and the definitions of τ i , K i , q i , and θ i are shown in Table 1. According to Assumptions 1 and 2, the dynamics model of a flexible joint manipulator is based on a simplification of the Lagrange equation Jθ ..
where (2a) is the dynamic equation for a rigid joint and (2b) is the mathematical model for a flexible joint. e meanings of the other notations are also listed in Table 1.

State Space
Model. e dynamic equation (2) is a nonlinear strongly coupled multivariable equation, for which it is difficult to establish a state space equation. erefore, it is necessary to linearize and discretize the equation to obtain the discrete state space equation. A Taylor expansion is used to linearize the input and output. e state variable of the manipulator is defined as , which can be obtained by a Taylor expansion: Inertia matrix for the rigid links, Torque vector caused by Coriolis force and centrifugal forces, Torque vector caused by gravity, G ∈ R 6×1 J Diagonal matrix of actuator inertias reflected to the link side of gears, J ∈ R 6×6 K Diagonal matrix containing the joint stiffness coefficients, K ∈ R 6×6 K i i-th joint stiffness coefficients According to (2), the relationship between the acceleration € θ of the joint and the state variables of the manipulator can be obtained: e state variable of the manipulator at the current moment is x(n), and the sampling period is T. Each component of the state variable is discretized by a Taylor expansion, and the discrete state space equation can be obtained: where A, B, G p , and C are matrices related to current state variables.
, and C � I 6 O 6 * 6 . Equation (5) is the discrete state space model of the manipulator.

Trajectory Planning
e control strategy of the 6-DOF manipulator designed in this paper adopts a hierarchical structure, that is, "trajectory planning layer + MPC layer + bottom control layer." In this structure, the role of the trajectory planning layer is to obtain the target trajectory through an intelligent algorithm. According to the requirements of the task, the trajectory planning of the manipulator can calculate the target trajectory and convert it into the parameters of the manipulator joint space, which lays the foundation for the accurate and stable execution of the task. In this section, a time-optimal trajectory planning method based on 3-5-3 polynomial interpolation is designed, which uses a GA to optimize each interpolation time.

Construction of the 3-5-3 Polynomial Function.
Given the spatial coordinates of the starting point, two trajectory points, and the terminal point of the manipulator in the rectangular coordinate system, the joint angles of each joint at the four interpolation points can be obtained by solving the inverse kinematics. ϕ ij is the angle of i-th joint interpolation, where i � 1, 2, 3, 4, 5, 6 represents the joint number and j � 0, 1, 2, 3 represents the ordinal number of the four interpolation points. e constraints for trajectory planning are as follows: the given initial points ϕ i0 , ϕ i1 , and ϕ i2 are path points, the terminal point is ϕ i3 , the position between path points is given, the continuity of the velocity and acceleration is given, and the velocity and acceleration at the starting and ending points are 0. A 3-5-3 polynomial interpolation curve trajectory is adopted between points, and the general formula of the 3-5-3 polynomial of the segment i-th joint is where h i1 (t), h i2 (t), and h i3 (t) are the first cubic polynomial trajectories, the second polynomial trajectories, and the third joint cubic polynomial trajectories. e unknown coefficients a i1j , a i2j , and a i3j are the j-th coefficients of the interpolation function of the i-th joint trajectory.
According to the above conditions, the unknown coefficients a ij can be deduced and solved. t i in (7) represents the interpolation time of the polynomial of segment 3 of the i-th joint, D is only related to t, and 4 Mathematical Problems in Engineering Equation (8) is the position matrix of the i-th joint angle, a � a i13 , a i12 , a i11 , a i10 , a i25 , a i24 , a i23 , a i22 , a i21 , a i20 , a i33 , a i32 , a i31 , a i30 Equation (9) is the solution of unknown coefficients a ij , 3.2. Trajectory Planning Based on the GA. A method of timeoptimal trajectory planning is designed that takes the optimal time in the working process of the manipulator as the objective function and the path and maximum angular velocity as the constraints. e time-optimal trajectory planning problem is a nonlinear dynamic optimization problem whose constraints are generally nonlinear, the calculation process is complex, and the calculation amount is large. For optimization of these kinds of problems, the 3-5-3 polynomial interpolation has no optimization property and can be solved by an intelligent optimization algorithm. In this paper, a time-optimal trajectory planning method that uses a GA to optimize each interpolation time is designed. e optimization objective is that each joint runs in the shortest time within the scope of the kinematic constraints, and its fitness function is where i � 1, 2, . . . , 6 and V i1 , V i2 , and V i3 are the velocities of each polynomial of the i-th joint changing with time. If each joint is optimized separately, then the optimization objective function of the i-th joint is where V i and V imax are the velocity and maximum limit velocity of the i-th joint, respectively.

Trajectory Planning Algorithm.
How to select independent variables to obtain the optimal time is the key problem to solve for the 3-5-3 polynomial interpolation function using a GA. In (7) to (9), times t 1 , t 2 , and t 3 are unknown variables to be optimized, and the coefficients a ij are also unknowns to be solved. e unknown coefficients a ij are taken as independent variables, and t 1 , t 2 , and t 3 are taken as dependent variables. According to (7)-(9), the dimension of the variables to be optimized is 14. If the search space of time variables t 1 , t 2 , and t 3 is optimized directly, then the dimension of variables to be optimized is reduced to 3, decreasing the complexity and difficulty of population optimization.
To make the joint speed converge to the constraint as quickly as possible, two fitness function switching control is adopted. If any velocity does not conform to (12), then the fitness function of the individual is |v(i, j)|, where i is the i-th group of the M group population and j is the number of segments of polynomial interpolation. While finding the optimal individual, the genetic algorithm reduces |v(i, j)| until the constraint body condition is satisfied. If the maximum speed of the three segments is consistent with (12), then (11) is used as the fitness function, and the genetic algorithm iteratively reduces the running time of each segment of the joint towards the optimization goal.
Specifically, the steps of the GA for time-optimal trajectory planning of the i-th joint of the manipulator are as follows: Step 1: (initialize the population). M populations are randomly generated in the time search space of three interpolation functions of the i-th joint: populations POP t1 , POP t2 , and POP t3 .
Step 2: By substituting m groups of time variables t i1 , t i2 , and t i3 into (7)-(9), the unknown coefficients a ij of the 3-5-3 polynomial are obtained.
Step 3: e coefficients a ij of the 3-5-3 polynomial are substituted into (6), and the velocity function of the joint angle is obtained by using the time derivative to judge whether the real-time velocity satisfies (11).
Step 4: According to the constraints, the fitness function is selected to calculate the fitness value of each individual.
Step 5: e GA operation is as follows: Step 6: Constitute new M × 3 populations POP t1 , POP t2 , and POP t3 .
Step 7: If the termination condition (usually a good fitness value or a preset maximum number of iterations N max ) is met, stop; else, go to Step 2.
Step 8: Complete the time optimization of each segment. e maximum value of each joint in each period of time is taken to ensure that kinematic constraints are met; that is, t 1 � max t i1 , t 2 � max t i2 , and t 3 � max t i3 . e GA requires cyclic iteration. e GA studied in this paper searches in the search space of the optimization target.

Mathematical Problems in Engineering
When (7) is calculated, the number of iteration steps is large, which may lead to nonfull rank matrices. erefore, during each iteration, it is necessary to test whether there are any individuals with an actual value of zero in the newly generated population. If so, individual values are randomly regenerated.

Trajectory Tracking
e hierarchical structure control strategy of the six-degreeof-freedom manipulator is divided into three parts. First, the target joint angles of the six flexible joints are obtained in the trajectory planning layer. en, in the MPC layer, the target joint angles are passed to the model predictive controller, and the optimized joint angles are obtained by solving (13). Further, in the bottom control layer, the optimized joint angles are transferred to the PD controller, the joint motion is driven by the torques obtained through (14), and the joint angles are measured by sensors. Finally, the joint angles are fed back to the model predictive controller for correction and input into forward kinematics to obtain the terminal trajectory.

Model Predictive Controller in the MPC Layer.
Considering that MPC is a multivariable control strategy and the constraints can be explicitly processed in the optimization problem, this approach is widely used for manipulator control [27]. In this paper, the six-input-sixoutput MPC controller is selected for the 6-DOF manipulator.
e MPC strategy explicitly incorporates the model and constraints of the system for determining control inputs. At each step k ≥ 1, the state space model is used to predict future outputs. At step k, an optimization problem involving future horizon prediction information (predictive horizon N p ) is solved online, and the control input of the future horizon (control horizon N c ) is calculated. At step k + 1, the optimization problem is solved again with new measurements. us, the control and prediction horizon recede by one step as time moves ahead by one step. e MPC strategy is adopted to design the model predictive controller and optimize the joint angle as follows: where θ(k + m|k) ∈ R 6×1 is the control input; (Tex translation failed) is the cost function; and θ d i (·) represents the target angle of the i-th joint, which is solved using inverse kinematics. Only the first obtained control input θ * (k|k) is applied to the system as the given value of the PD controller.

PD Controller in the Bottom Control Layer.
However, the MPC is computationally expensive and slow in response, and it is not easy to control the multidegree-of-freedom manipulator. Compared with model predictive controller, the PD controller has better dynamic performance and faster response speed. erefore, in the hierarchical control strategy designed in this paper, the model predictive controller with six inputs and six outputs is used to optimize the joint angle, and then the set values are transmitted to the bottom PD controllers to achieve.
PD feedback control is simple and easily implemented in engineering practice. Here, the PD controller is designed as follows: where θ . i is the actual i-th joint angular velocity; θ * i is the optimized i-th joint angle of the upper model predictive controller; τ m * i is the optimized i-th joint driving torque of the PD controller; and K p and K d are the proportional and differential terms, respectively, both of which are diagonal positive definite matrices.

4.3.
e Overall Algorithm. e overall algorithm is as follows.

Simulation and Experiment
To verify the effectiveness of the hierarchical structure control strategy, the designed strategy is simulated using the Robotics Toolbox of MATLAB 2015a. 6 Mathematical Problems in Engineering

Simulation of Trajectory Planning.
e simulation object in this section is a 6-DOF flexible joint manipulator. e kinematics model of the manipulator is constructed by the D-H method. e D-H parameters of the joints are shown in Table 2, where α i is the i-th link twist angle, a i is the i-th link length, and d i is the offset value of the i-th joint.
In the Cartesian coordinate system, the interpolation points of the manipulator are given as shown in Table 3.
rough the inverse kinematics solution, the joint angles corresponding to the initial point, path points, and terminal point of the joints are obtained, as shown in Table 4. e 3-5-3°polynomial interpolation method based on PSO is used to optimize the interpolation time.
e parameters are set as follows: set the particle swarm to 20, the number of iteration steps to 50, the inertia weight to w m ax � 0.9 and w m in � 0.4, and the weight factors to c 1 � 2 and c 2 � 2.
e maximum allowable velocity of the joint is |V max | � 1 rad/s, and the velocity and acceleration at the initial point and the terminal point are 0. After 50 iterations, the joint interpolation times are t 1 � 11.3831 s, t 2 � 4.2968 s, and t 3 � 14.2823 s. e joint position curve, velocity curve, and acceleration curve are shown in  e steps in Section 3.3 are followed to determine the best time for each interpolation segment. Among the parameters, the population size is 100, the number of evolution generations is 50, the hybridization rate is p c � 0.8, and the variation rate is p m � 0.5. e maximum allowable velocity of the joint is |V max | � 1 rad/s, and the velocity and acceleration at the initial point and the terminal point are 0. According to Step 8, the joint interpolation times are t 1 � 7.3008 s, t 2 � 2.5050 s, and t 3 � 4.2507 s.
After time optimization, the curves of the joint position, velocity, and acceleration are as shown in Figures 6-8. e joint velocity of the manipulator is close to V max , and the acceleration is relatively stable.
Compared with the PSO results in the previous section, the GA is 15.905 7 s shorter than PSO in time. Although the two algorithms can reach the optimal time under the kinematic constraints, after the optimization of GA, the joint speed is closer to the maximum speed, and the convergence speed is faster.
Although the PSO has the characteristics of simple structure and easy parameter adjustment, it still needs to use a random number to generate particle speed when generating a new particle swarm, thus reducing the convergence speed of particles. Although the GA is also based on the mask crossover of random generation, this paper can quickly eliminate vulnerable individuals by setting the crossover rate so that the individuals in the population can maintain high adaptability. e PSO has a fast convergence speed. However, when the particles are too concentrated, they are likely to fall into local minima. erefore, as shown in Table 5, in 10 simulation tests, the optimization effect of most particle swarm optimization algorithms is basically consistent with that of the genetic algorithm and sometimes even better than the genetic algorithm. However, when the particle swarm optimization algorithm falls into the local minimum, its optimization effect is far less than that of the genetic algorithm, such as the fifth simulation result. Because the mutation operator of the genetic algorithm can ensure that the genetic algorithm jumps out of the local minimum, the stability of the genetic algorithm is higher than that of the particle swarm optimization algorithm, so the stability of the genetic algorithm is higher.

Simulation of the Hierarchical Structure Control Strategy.
e rigidity coefficient is K � 10 4 , while the predictive horizon and the control horizon are N p � 30 and N c � 5, respectively. e maximum simulation step is k max � 705. e sampling period T is chosen as 0.02 s. Considering the complexity of MPC, in each sampling period T, MPC calculates a group of set points only once, while the PD controller calculates 30 times to track the set points. e simulation results are shown in Figures 9-16.
Compared with the PD control strategy, the terminal trajectory of the hierarchical structure control strategy is more stable, and the tracking performance is much better, which shows that the designed strategy can restrain the jitter of flexible joints more effectively. For convenience of analysis, the projection of the trajectories in Figure 9 on the xy plane is shown in Figure 10, and further, the angle trajectories of each joint are shown in Figures 11-16. From  Figures 1-16, we obtain the same conclusions. e sum of squared error (SSE) is adopted to evaluate the effectiveness of the two control strategy: where E(k) is the actual value and E d (k) is the target value. e SSE comparison is shown in Table 6. For the joint trajectories, the SSE of the hierarchical structure control strategy is always smaller than that of the PD control strategy, and for the terminal trajectories, the SSE of the hierarchical structure control strategy is reduced by 33.70% compared with the PD control strategy. In general, the designed hierarchical structure control strategy can coordinate and control the 6-DOF flexible joint manipulator more effectively than the PD control strategy.
To further illustrate the anti-interference and antidisturbance performance of the proposed method, here, we design two cases. In Case 1, we add the white noise ([−0.001, 0.001]) in the feedback path. In Case 2, we add the disturbance (the amplitude is 0.005, and the time of duration is 1s) in the feedback path. e simulation results are shown in Figures 17 and 18, respectively. From Figures 17 and 18, we can clearly find that the tracking performance of the proposed strategy is much better than that of the PD strategy in both of the above two cases.

Experiment of the Hierarchical Structure Control Strategy.
In this paper, the dynamics and control theory of 6-DOF manipulator are studied, and the hierarchical structure control strategy is verified by simulation, but there are differences between theory and practice. erefore, this section that has carried on the experimental research to the Mathematical Problems in Engineering manipulator, through the experiment, has verified the validity and the feasibility of the control strategy.
In this paper, we use the desktop manipulator, LeArm, as shown in Figure 19. e LeArm manipulator has six movable joints, with joint 1 moving left and right to realize base rotation; joint 2 and joint 3 moving back and forth; joint 4 moving up and down; joint 5 moving left and right to realize mechanical claw rotation; joint 6 closing the mechanical claw.
e D-H parameters of the arm are shown in Table 7. e joints of the LeArm manipulator are driven by actuators and cannot directly feed back the actual joint angle. erefore, in this experiment, the BWT901CL angle sensor is used to measure the joint angle, and the measured joint angle is fed back to the model predictive controller through a serial port for feedback correction, thus avoiding the error caused by the model mismatch.
In order to verify the effectiveness of the hierarchical structure control strategy of the 6-DOF manipulator, based on MPC, an experimental study was carried out on the LeArm manipulator. Firstly, the target position of each joint is given; then, the hierarchical structure control strategy     Mathematical Problems in Engineering designed in this paper and the traditional PD control strategy are, respectively, used to make the manipulator reach the target position, as shown in Figure 19, which are three states in the process of robot arm motion; finally, taking joint 2 as an example and taking joint 3 and joint 4 as research objects, the joint angle curves under the two control strategies are compared in  As shown in Figures 20-22, by comparing and analyzing the curves under the two control strategies, the effect of the hierarchical control strategy is obviously better than that of the PD control strategy. Although these two control strategies can drive the manipulator to the target position in a limited time, the difference is that the hierarchical structure control strategy can get the predicted output of the actuator in the time domain in advance. When the manipulator is close to the target position, the speed of the actuator is limited, which makes the manipulator fast and stable and reduces the overshoot.
Generally speaking, the hierarchical structure control strategy is outstanding in terms of rapidity and overshoot suppression, which verifies the effectiveness of the hierarchical structure control strategy designed in this paper for the manipulator control process. However, the hierarchical  Figure 5: Joint acceleration curve based on PSO.
structure is more complex than that of the PD strategy, which brings in more challenges during the implementation in the actual application; at the same time, the computation burden is much heavier, and the computing devices with higher performance are needed. In other words, the performance improvements of the proposed strategy come at  Figure 8: Joint acceleration curve based on GA. Note. e PSO and GA are compared in joint angle, angular velocity, and angular acceleration curve.                     the expense of the control system complexity and the computation increase.

Conclusions
In this paper, based on the dynamics analysis of a 6-DOF flexible joint manipulator, the trajectory planning and control implementation of the manipulator are thoroughly studied. By designing a hierarchical structure control strategy, the manipulator can achieve the target trajectory quickly and stably. Simulation results show that the control performance of the designed strategy is better than that of the PD control strategy. In the future, the following two points should be further paid more attention: (1) the research results should consider the actual condition, such as the system uncertainty and external disturbance; (2) the proposed strategy should be implemented online to the actual application scenarios through the embedded devices.

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that they have no conflicts of interest.