Trajectory planning of vibration suppression for hybrid structure flexible manipulator based on differential evolution particle swarm optimization algorithm

A differential evolution particle swarm optimization algorithm is proposed to address the vibration problem of a hybrid structure flexible manipulator after motion and stop. Firstly, the errors in the modeling process of the flexible manipulator were corrected, and its state variables were decomposed to establish dynamic and kinematic models. A sliding mode controller was then designed to track the trajectory. To find the optimal trajectory, a mapping function was constructed, and non-uniform interpolation points were selected. A normal distribution function was used to select discrete interpolation points, and the cubic spline interpolation was used to fit the trajectory. To prevent the particle swarm optimization algorithm from falling into local optima, the mutation and crossover operators of the differential evolution algorithm are incorporated into the algorithm, thereby expanding the search range. The effectiveness of this improved method was verified by comparing it with traditional particle swarm optimization algorithms. This study provides a new trajectory planning approach for the motion control of a hybrid structured flexible manipulator and has important practical significance.


Introduction
Mechanical manipulators play an important role in modern industry and construction, as they can replace manual labor to complete dangerous tasks and improve efficiency.At the same time, flexible robotic manipulators are widely used in daily life due to their advantages as they are lightweight, have wide workspace, and have low manufacturing costs.However, due to the low stiffness of the flexible robotic manipulator itself, it is prone to large deflection problems, resulting in vibration during movement and affecting its working performance.To address this issue, researchers are actively conducting research in the field of flexible robotic manipulators, proposing trajectory planning and control algorithms for suppressing vibration, in order to further optimize its motion performance.
For example, Li conducted research on single link flexible manipulator, but the operating space is limited, which is not conducive to practical applications [1].Yu and Chen studied a rotating doublelink flexible robotic manipulator; however, the study lacks expansion joints, which limits a certain operating space [2].So far, most of the research objects on flexible manipulators are single-link or double-link rotating joint flexible manipulators, while there is little research on rotating and telescopic mechanical manipulators.Therefore, this experiment uses Long's model to study and correct some of the problems in modeling [3].Due to the presence of end vibration in the flexible manipulator, in order to reduce the vibration situation, trajectory planning is required for the flexible manipulator.At present, researchers have applied neural networks [4], particle swarm optimization algorithms [5], ant colony optimization algorithms [6], etc., to trajectory search algorithms.However, there are few applications for flexible manipulator trajectory planning.Abe [7] used neural networks for feedforward input shaping, but did not conduct in-depth research on vibration suppression trajectory planning.Wang et al. [8] used particle swarm optimization to optimize the trajectory parameters of the Bezier function and obtained corresponding optimization results through different objective functions.However, due to the limitations of the Bezier function, the trajectory function cannot achieve optimal results.Wu et al. [9] used the method of inserting interpolation points to describe the trajectory of spatial dual flexible manipulators, but there is no clear range for the insertion position of the interpolation points, which can easily lead to local interpolation point redundancy.In addition, the algorithm efficiency is relatively reduced.Therefore, to solve the trajectory planning problem of the flexible manipulator, a new algorithm is adopted.It combines particle swarm optimization and differential evolution algorithm and adds mutation and crossover operators to the particle swarm algorithm.After experimental comparison, the effectiveness of the method was demonstrated.The impact of different factors on the algorithm was analyzed.

Modeling of Hybrid Structure Flexible Manipulator
The flexible manipulator utilizes Long et al.'s [3] model and establishes a coordinate system as shown in Figure 1: As can be seen from Figure 1, 1 3   represents the joint angles of the fixed segment, overlapping segment, and extension segment connecting rods;  is the input torque of the rotating joint; F is the driving force of the expansion joint; k is the elongation length; 1 3 Z Z , 1

3
Q Q , and 1 3 l l respectively represent the maximum elastic deformation, modal variable, and initial length of each segment at the end.A principal coordinate system XOY is established in a vertical plane with the rotational joint axis O as the origin.Reference coordinate systems of 1 X O Y , and 3 3 3

X O Y 
are established for the fixed segment, the outer rod of the overlapping segment, the inner rod of the overlapping segment, and the extension segment, respectively.
The system state variables are divided into rigid corner part state variables , and flexible deviation partial state variables . Dynamic models of the hybrid structure flexible robotic manipulator are established for the state variables of the rigid and flexible parts respectively.However, we identified some issues during the reference process and made modifications to the model of the robotic manipulator modeling.

Establishment of the rigid part model.
To obtain the dynamic equation corresponding to the rigid state variable, without considering the elastic deformation of the flexible manipulator, a force analysis is performed on it.Then, the kinetic energy, potential energy, and generalized forces corresponding to the generalized coordinates of the system are substituted into the Lagrange equation to obtain the dynamic equation as follows: ( 1 ) where where A is the mass matrix of the rigid part,   is the joint acceleration of the rigid part, B is the centrifugal force and Coriolis force,   is the rigid joint velocity, C is the gravity matrix of the rigid part, and D is the joint torque of the rigid part. 1 n and 3 n represent the mass per unit length of the first and second rods, respectively.

Establishment of flexible part model
For the specific derivation process, please refer to Long et al.'s study [3].For the correction, we use X O Y , and 3 3 3 X O Y as the reference coordinate systems for the fixed segment, the outer rod of the overlapping segment, the inner rod of the overlapping segment, and the extension segment, respectively.The dynamic equation is obtained as follows: ( 2 ) Among them, S M , S G , and S J are all matrices of 5 5   ; S N is a matrix of 5 1  , and matrices S M , S G , S J , and S N are functions of rigid state variables.In the process of derivation Φ , the expansion joint caused the calculation of the bending stiffness of the overlapping section to be complex.To reduce the calculation amount, it is considered that the bending stiffness of the flexible arm is the bending stiffness of the fixed section.According to the superposition method of beam displacement in material mechanics, it is believed that the end section angle is approximately the joint angle deviation.The generalized forces corresponding to 2   and 3   are approximately:

Kinematics model
To study the end vibration of the flexible manipulator, it is necessary to determine the position of the end of the flexible manipulator in the main coordinate system.Therefore, it is necessary to establish the kinematic equation of the hybrid structure flexible manipulator through the Cartesian space homogeneous transformation matrix from joint space to the end.The kinematic model is: where 1 T , 2 T , and 3 T is the homogeneous transformation matrix corresponding to the fixed, overlapping, and extension segments of the flexible manipulator.

Design of the Sliding Mode Controller
To analyze the vibration of a hybrid structure robotic manipulator during motion, a sliding mode controller is designed based on Equation (1) to track the set trajectory.The state variables obtained from the rigid equation are substituted into the Equation ( 2) and solved to obtain the flexible state variables.The following is the design of a sliding mode controller based on the rigid part model.( , ) diag j j  J , and 1 2 0, 0 j j   .The Lyapunov function can be defined as: The control law designed based on the nominal model is: ( 5 ) in the equation, Â , B , and Ĉ are estimated values of A , B , and C respectively, reflecting the uncertainty of the model.

  at
Γs S is a sliding mode switching control item.By bringing Equation ( 5) into Equation ( 4) and organizing it, we have: ; when and only when Therefore, according to Lyapunov stability theory, the entire system is asymptotically stable, and the designed sliding mode controller can achieve target tracking.

Vibration Suppression Trajectory Planning
The research focus of this article is on the vibration suppression of the end of the flexible manipulator after its motion stops.The amplitude of excitation during the motion of a flexible manipulator is directly related to the motion trajectory.Therefore, designing a suitable vibration suppression trajectory planning method before the flexible manipulator moves is an effective way to solve this problem.

Interpolation point selection
Due to the fact that the vibration of a flexible robotic manipulator during motion is mainly determined by the position, velocity, and acceleration during the initial stage, while the residual vibration after stopping motion is mainly determined by the position, velocity, and acceleration during the stopping stage.Therefore, in order to suppress the vibration of the flexible manipulator, the main focus is on the starting and stopping stages of the flexible manipulator.Therefore, to focus on the start and stop stages, non-uniform time interpolation is used.The mapping function is constructed as follows:  

Joint space trajectory function
According to the path planning problem from point to point, the trajectory of the rotation and expansion joints of a hybrid structure flexible robotic manipulator has the following constraints: t is the stop time and f z is the end position of the trajectory.According to the given constraints, using cubic polynomials, a unique initial trajectory can be determined, namely:  

Optimization objective function
According to the vibration amplitude, the optimization objective function is divided into a motion part and a motion stop part.The optimization objective function can be defined as follows: where f t is the movement time of the flexible manipulator; the first half of the objective function is to measure the vibration of the end when the flexible manipulator moves; the second half of the objective function is to measure the vibration of the end after the flexible manipulator stops moving.The weight factors  and  are to change the emphasis in the optimization process.The larger the value of the first half of the objective function is, the more emphasis is placed on vibration suppression during the motion phase.The opposite emphasizes residual vibration suppression during the stop phase.

Initial population selection
To improve optimization efficiency, a normal distribution function is used to select the initial particle position.Non-uniform interpolation points are used on the trajectory of a cubic polynomial as the mean, and 1 /  times the minimum distance from the interpolation point to the starting or stopping position is used as the standard deviation.Then, we have: In the optimization process, the global optimal value and flight speed are constantly updated according to the following rules until the maximum number of iterations is reached: M , and k ij H represent the velocity, local optimal value, current position, global optimal value, particle swarm algorithm updated position, and differential evolution particle swarm updated position after k iterations, respectively.Z  represent updated speed and position, and set the constraint ranges for speed and position to avoid excessive speed, otherwise it is not conducive to finding the optimal trajectory and the trajectory found does not match the actual situation.

Optimize the process
The specific steps based on the differential evolution particle swarm algorithm are as follows: Step 1.By mapping functions, non-uniform time interpolation points are obtained.
Step 2. On the cubic polynomial trajectory, the time interpolation point is selected to obtain the corresponding position.The normal distribution function is used to select the values of different particles in the same dimension at each position, and then use a cubic spline function to fit the initial trajectory of points in different dimensions of the same particle.Using the sliding mode controller control to track the trajectory.
Step 3. By calculating the objective function of the initial trajectory, the trajectory corresponding to the minimum objective function can be found.The individual optimal fitness can be recorded.
Step 4. The velocity and position of the particles are updated using the differential evolution particle swarm algorithm.
Step 5.The individual optimal fitness of the updated medium particle and the corresponding position of the particle are recorded.
Step 6. Steps 4 and 5 are repeated until the optimization is complete to find the position corresponding to the optimal fitness of the individual.

Simulation Analysis of Optimal Vibration Suppression Trajectory
According to the experimental requirements, the initial lengths of each segment are 1 0.6 and motion time is 2s for the flexible manipulator with a hybrid structure.In this process, the rotating joint rotates counterclockwise from the horizontal direction to the vertical direction, and the telescopic joint extends during the rotation so that a total of 0.4m is extended.The total simulation time is 6s .The rotation joint angle and elongation length are set to 0 initially.According to the cubic polynomial Equation ( 6), the reference trajectories for the design of the rotating joint and the extension joint of the flexible arm are as follows:

Comparison of algorithms
After selecting 9 interpolation points for the initial trajectory in non-uniform time, each interpolation point is taken as the mean.A normal distribution function is used to randomly select 5 values on each interpolation point, resulting in a matrix of 5 9   .Each row of data serves as the dimension of a particle, resulting in a total of 5 particles, each with 9 dimensions.As can be seen from Figure 3, although the optimization speed of the particle swarm optimization algorithm is faster than that of the differential evolution particle swarm optimization algorithm, due to the large dimension of the population, it is easy to fall into the local optimal.The improved differential particle swarm optimization algorithm is better than the particle swarm optimization algorithm.As can be seen from Figure 4, when the first half of the objective function takes a relatively large proportion, it is mainly aimed at the vibration when the motion is suppressed, and the vibration after the motion stops is larger.When the proportion of the first half of the objective function is small, the main aim is to suppress the vibration after the motion stops.However, if the proportion of the first half is very small, it is not conducive to finding the trajectory, and the result is not ideal.As can be seen from Figure 5, when  is 5, the effect is the best.This is because the value of  is too small.Although the search space is increased, the search time is also increased, and it is easy to fall into local optimal.If the value of  is too large, although the search space is reduced, it is not conducive to finding the optimal value.  were taken, in the first case, the data in each row of the first four columns is arranged from small to large, and the data in each row of the last five columns is arranged from large to small.In the second scenario, the data in each row of the 9 columns is arranged in descending order.The third algorithm does not arrange the data generated by a normal distribution.The tests were carried out respectively and the results were shown in Figure 6.As can be seen from Figure 6, the results obtained without arrangement are better, which helps to increase the search space and ultimately find the optimal trajectory.

Conclusion
This article decomposes the state variables in the hybrid structure flexible robotic manipulator.It modifies the errors in the model, and establishes models separately, providing a way for future modeling of flexible robotic manipulators.By comparing the differential evolution particle swarm optimization algorithm with the particle swarm optimization algorithm, the feasibility and advantages of this algorithm were verified, providing ideas for improving other algorithms.The impact of different variables in the algorithm on the results were analyzed, providing direction for the optimization of other algorithms.
is taken as the error signal, where trajectory.The designed sliding surface is:

M
indicates a position different from that of i particle at the same latitude ask ij M . , 1 c , 2 c ,and 3c represent weight factors; 1 r and 2 r represent random numbers from 0 to 1; F and CR represent mutation and crossover operators;1

1 0
aluminum alloy robotic arm is used.The first rod is designed with an outer diameter of 2 centimeters and an inner diameter of 1.6 centimeters.The second rod has an outer diameter of 1.5 centimeters and an inner diameter of 1.2 centimeters.Based on the density 3 2680 / kg m  of aluminum alloy and the elastic modulus 72GPa of aluminum alloy at room temperature, it is determined that the unit masses of the first and second connecting rods are

Figure 2 .
The reference trajectory is substituted into the sliding mode controller.The obtained rigid part state variable is substituted into the Equation (2).The equation is solved by ode15s solver.The state variable of the flexible part is obtained.The state variable of the rigid part and the state variable of the flexible part are substituted into the Equation (3), so as to obtain the end deviation of the flexible arm in the process of motion.This is shown in Figure2.(a) (b) Vibration of cubic polynomial.MATMA-2023 Journal of Physics: Conference Series 2691 (2024) 012002 IOP Publishing doi:10.1088/1742-6596/2691/1/0120027

6. 1 . 1 5 Figure 3 .
Comparison of adaptive values between improved differential evolution algorithm and particle swarm optimization algorithm.After experimental analysis,  were taken.The data in each row of the first four columns is arranged from small to large, and the data in each row of the last five columns is arranged from large to small.Under the same initial conditions, with 30 iterations, the results are shown in Figure3.Adaptive changes and end deviations.

5 
 were taken, the initial particle position was the same as above.For the influence of the weight factor, the vibration of the end of the flexible manipulator under different values is compared by simulation results.The results are shown in Figure4.

Figure 4 .
Vibration of different weight factors.

3   , 5   , and 6 
taken, the initial particle position was the same as above.When the values of  are different, the vibration of the end is shown in Figure5.

Figure 5 .
Vibration with different standard deviations.

6. 1 . 4
The effect of initial trajectory on the result.

Figure 6 .
Vibration of different initial trajectories.