Vibration Suppression Trajectory Planning of Underwater Flexible Manipulators Based on Incremental Kriging-Assisted Optimization Algorithm

: It is of great signiﬁcance to expand the functions of submarines by carrying underwater manipulators with a large working space. To suppress the ﬂexible vibration of underwater manipulators, an improved sparrow search algorithm (ISSA) combining an elite strategy and a sine algorithm is proposed for the trajectory planning of underwater ﬂexible manipulators. In this method, the vibration evaluation function is established based on the precise dynamic model of the underwater ﬂexible manipulator and considering complex motion and vibration constraints. Simulation results show that the ISSA algorithm requires only 1/3.68 of the time of PSO. Compared to PSO, SSA and the opposition-based learning sparrow search algorithm (OBLSSA), the optimization performance is improved by 17.3%, 13.1% and 9.7%, respectively. However, because the complex dynamics model of the underwater ﬂexible manipulator leads to large computational effort and a long optimization time, ISSA is difﬁcult to apply directly in practice. To obtain a large number of optimization results in a shorter time, an incremental Kriging-assisted ISSA (IKA-ISSA) is proposed in this paper. Simulation results show that IKA-ISSA has good nonlinear approximation ability and the optimization time is only 3% of that of the ISSA.


Introduction
Nowadays, the extension of the functions of large submersibles using underwater manipulators for the dynamic deployment and recovery of unmanned underwater vehicles (UUV) is a major research direction [1][2][3].UUVs have the characteristics of strong concealment, high intelligence, lower construction costs and no casualties.The integration of submarines and UUVs can combine each one's advantages and improve the overall performance of submarines.As new collaborative models between UUVs and submarines are gradually enriched and perfected, the question of how to carry, deploy, dock and recover one or more UUVs on a submarine is a key technical issue in the new collaborative model.To realize the above operations, using a submarine to carry the manipulator with large-scale operation capability is an important solution.The recovery and docking process of UUVs with the underwater manipulator is shown in Figure 1, in which the underwater manipulator can be stored in a small space inside the submarine after the operation is completed.Considering the occupation of the limited collection space of the submarine and the impact on its load capacity, the manipulator should have a large working space, a small storage space and a small weight so that it can be stored in the small space of the submarine.To meet the above technical requirements for large-scale operation and small-space storage of the underwater manipulator, the manipulator is often designed to be very slender.Due to the low stiffness of slender manipulators, the end effector is prone to vibration, and previous control methods that ignore the flexible deformation of manipulators are not able to meet the high-precision requirements of underwater operations [4,5].In addition, when the manipulator is working, the speed and acceleration at the end of the manipulator should be strictly limited to meet the corresponding constraints.It is also necessary to overcome the interference of hydrodynamic forces.These factors bring great challenges to the control of underwater manipulators.Although extensive research has been carried out on the control of flexible manipulators and underwater manipulators, the vibration suppression of underwater flexible manipulators is still a difficult problem to solve.
slender.Due to the low stiffness of slender manipulators, the end effector is prone to vibration, and previous control methods that ignore the flexible deformation of manipulators are not able to meet the high-precision requirements of underwater operations [4,5].In addition, when the manipulator is working, the speed and acceleration at the end of the manipulator should be strictly limited to meet the corresponding constraints.It is also necessary to overcome the interference of hydrodynamic forces.These factors bring great challenges to the control of underwater manipulators.Although extensive research has been carried out on the control of flexible manipulators and underwater manipulators, the vibration suppression of underwater flexible manipulators is still a difficult problem to solve.At present, the vibration suppression of flexible manipulators is mainly studied from the perspective of control methods and trajectory planning.Sahu and Patra proposed an observer-based backstepping control method for a two-degree-of-freedom flexible manipulator [6].Yang et al. proposed a hybrid control scheme composed of a trajectory planning approach and adaptive variable structure control to suppress the elastic vibration [7].Rahmani and Belkheiri designed a neural network adaptive controller of flexible multi-link robots.The adaptive controller has good robustness under uncertain disturbances [8].Yavuz proposed an improved vibration control method that suppresses residual vibration by shaping the speed input [9].Guo et al. proposed a residual vibration suppression method for Delta robots based on input shaping technology [10].Xu et al. proposed a compensation method; this method is based on the analytical solution of a second-order vibration system and designs compensation torque to suppress vibration [11].Sands designed a whiplash compensator for flexible space robots, which had zero residual vibration at the end of the maneuver [12].Trajectory planning for vibration suppression was firstly proposed by Park and Park [13].Their method uses the excitation force, elastic deformation or elastic potential energy as the objective function to find the joint trajectory with the smallest flexible deformation or elastic potential energy, so as to achieve the vibration suppression of the manipulator.The vibration suppression trajectory optimization mainly defines the motion trajectory of the robot joint as polynomial functions or B-spline functions, transforms the discrete dynamic variables into parameter optimization problems and suppresses the flexible vibration of the flexible robot by optimizing the parameters [14][15][16].
The most commonly used optimization algorithms include traditional optimization algorithms (simplex method and compound shape method) and intelligent optimization algorithms (particle swarm optimization algorithm, genetic algorithm and sparrow search algorithm).The compound shape method is a direct method to solve the constrained nonlinear optimization problem.Lin et al. proposed an optimization method for the shortest total travel time under physical constraints such as joint velocity and acceleration based At present, the vibration suppression of flexible manipulators is mainly studied from the perspective of control methods and trajectory planning.Sahu and Patra proposed an observer-based backstepping control method for a two-degree-of-freedom flexible manipulator [6].Yang et al. proposed a hybrid control scheme composed of a trajectory planning approach and adaptive variable structure control to suppress the elastic vibration [7].Rahmani and Belkheiri designed a neural network adaptive controller of flexible multi-link robots.The adaptive controller has good robustness under uncertain disturbances [8].Yavuz proposed an improved vibration control method that suppresses residual vibration by shaping the speed input [9].Guo et al. proposed a residual vibration suppression method for Delta robots based on input shaping technology [10].Xu et al. proposed a compensation method; this method is based on the analytical solution of a second-order vibration system and designs compensation torque to suppress vibration [11].Sands designed a whiplash compensator for flexible space robots, which had zero residual vibration at the end of the maneuver [12].Trajectory planning for vibration suppression was firstly proposed by Park and Park [13].Their method uses the excitation force, elastic deformation or elastic potential energy as the objective function to find the joint trajectory with the smallest flexible deformation or elastic potential energy, so as to achieve the vibration suppression of the manipulator.The vibration suppression trajectory optimization mainly defines the motion trajectory of the robot joint as polynomial functions or B-spline functions, transforms the discrete dynamic variables into parameter optimization problems and suppresses the flexible vibration of the flexible robot by optimizing the parameters [14][15][16].
The most commonly used optimization algorithms include traditional optimization algorithms (simplex method and compound shape method) and intelligent optimization algorithms (particle swarm optimization algorithm, genetic algorithm and sparrow search algorithm).The compound shape method is a direct method to solve the constrained nonlinear optimization problem.Lin et al. proposed an optimization method for the shortest total travel time under physical constraints such as joint velocity and acceleration based on the compound shape method [17].Yin et al. optimized the two joint trajectories based on the Nelder-Mead simplex method in the feedforward control of the flexible manipulator to reduce the residual vibration of the flexible manipulator [18].Since the selection and replacement of each vertex of the complex shape algorithm needs to meet the requirement of decreasing the value of the objective function and constraints, the search efficiency is relatively low.In processing optimization problems with complex models and constraints, the intelligent optimization algorithms have more advantages than traditional optimization algorithms.Wu et al. used a uniform aperiodic fourth-order B-spline curve to describe the trajectory of the manipulator, and conducted vibration suppression optimization for B-spline control points based on PSO [14].Li et al. used a polynomial function to describe the trajectory of the manipulator, and used PSO for the optimization of polynomial interpolation points to suppress vibration [19].Yue et al. and Kazem et al. studied the trajectory planning of robots based on the genetic algorithm (GA) to optimize the time in motion [20,21].Li et al. used the GA to control the coefficients of cubic spline interpolation to suppress the vibration of the manipulator [22].Different from GA, PSO does not use hybridization, mutation or replication for individuals, but instead treats each individual as a particle without volume in a multi-dimensional search space.In the process of vibration suppression trajectory optimization, the PSO algorithm has lower computational complexity than the GA.PSO has no special requirements for the objective function, while the GA requires a constant positive fitness function.However, the standard PSO algorithm is an unconstrained optimization algorithm, while the vibration suppression optimization of underwater flexible manipulators is constrained by the joint angle and flexible vibration.For the application of the PSO algorithm in constrained optimization problems, researchers have proposed a series of schemes to solve constrained optimization problems, among which the penalty function method and the constraint-based individual sorting method are the most widely used [23-25].Cao et al. proposed a PSO algorithm with a compression factor as a penalty function to correct the joint trajectory and suppress the vibration of flexible joints [26].Wang et al. studied the application of the PSO strategy under constraints of trajectory planning for a free-floating dual-arm robot [27].Due to the constraints, PSO is more prone to premature convergence in the constrained optimization process.Although various improved PSO algorithms to solve constrained optimization problems have improved the optimization performance to a certain extent, premature convergence still exists.SSA is a new heuristic algorithm for swarm intelligence, proposed by Xue and Shen [28].Zhang et al. proposed a path planning method for bionic mobile robots based on the sparrow search algorithm [29].Liu et al. proposed an improved sparrow search algorithm to solve the obstacle avoidance problem of UAV route planning, and achieved good results [30].Compared with the traditional heuristic search method, the SSA has more diversified position updating strategies, faster convergence speeds and more extensive application scenarios, indicating its great potential in dealing with robot vibration suppression trajectory planning.
Although there are some studies on the vibration suppression of flexible manipulators, in these studies, the suppression optimization effect remains to be further improved due to the relatively simple constraints and largely simplified models of flexible manipulators, and the vibration suppression of underwater manipulators is not involved.In addition, most of the current optimization algorithms suffer from premature convergence and poor accuracy in the constrained optimization process, and the optimization time is too long and costly for the case of complex models, making it difficult to be applied directly to practice.
To solve the problems of the premature convergence and low accuracy of traditional optimization algorithms in the process of constrained optimization, this paper proposes ISSA, which combines the sine algorithm and elite opposition-based learning strategy to optimize the trajectory of constrained underwater flexible manipulators.To obtain a large number of optimization results in a shorter time, this paper proposes IKA-ISSA, based on ISSA, to quickly generate vibration suppression trajectories of underwater flexible manipulators.The main contributions of this paper are summarized as follows.(i) In the past, the research object of vibration suppression trajectory planning was land-based flexible manipulators, while the research object of this paper is underwater flexible manipulators, considering the influence of hydrodynamics.(ii) The previous vibration suppression trajectory planning of flexible manipulators has greatly simplified the model.This paper is based on a more accurate dynamic model, and also considers the velocity, acceleration, maximum flexible displacement and other complex constraints.(iii) Based on the combination of the sine algorithm and OBL strategy, an improved sparrow algorithm is proposed, which is used for the first time to solve the vibration suppression trajectory planning problem for underwater flexible manipulators.(iv) IKA-ISSA is proposed for the problems of large computation demands and long optimization times for complex models.The algorithm has good robustness and nonlinear approximation capability, and can obtain accurate vibration suppression trajectories in a short time.
The rest of this paper is organized as follows.Section 2 presents the dynamic modeling approach for an underwater flexible manipulator.Section 3 describes the motion and vibration constraints, and establishes the manipulator vibration evaluation function.Section 4 designs the vibration suppression trajectory strategy of the underwater flexible manipulator based on PSO and ISSA and verifies the optimization effect of ISSA by simulation.Section 5 proposes IKA-ISSA and verifies its high optimization accuracy and efficiency by simulation.Finally, the conclusions can be found in Section 6.

Materials and Methods
The modeling of underwater flexible manipulator systems involves the complex integration of multiple disciplines, such as fluid mechanics and multi-body dynamics.The underwater flexible manipulator is usually disturbed by hydrodynamics, as well as some uncertain factors.These influences and disturbances are highly nonlinear and time-varying, which increases the difficulty of flexible manipulator modeling [31,32].The authors of this paper fully consider the coupling effect of hydrodynamic force and flexible vibration, and we have established the dynamic equation of rigid-flexible coupling in our previous work [33,34].
The mechanism diagram of a two-link rigid-flexible coupling manipulator can be simplified as in Figure 2, in which arm 1 is abstracted as a rigid link and arm 2 is abstracted as a flexible link.The flexible link adopts the Euler-Bernoulli beam model, and the transverse shear deformation is ignored.θ i and l i , respectively, represent the rotation angle and length of the i-th link.w represents the flexible displacement.According to the assumption of small elastic deformation, only the first two-order modes are considered when w is expanded based on the assumed mode method (AMM).By combining the Morrison formula and Lagrange equation, the dynamic equations of the underwater flexible manipulator can be expressed in the following compact form [33,34]: By combining the Morrison formula and Lagrange equation, the dynamic equations of the underwater flexible manipulator can be expressed in the following compact form [33,34]: where θ = θ 1 θ 2 T is the joint angle, q = q 1 q 2 T is the first two-order modes, M * * is the mass matrices, K q is the stiffness matrix, C r and C f is the terms of centrifugal forces, Coriolis forces, and gravity.τ is the joint torque, and F θ and F q are the generalized forces related to hydrodynamic force.

Cubic Polynomial Trajectory Planning
According to (1), the flexible motion part of the dynamic equation of the underwater flexible manipulator can be expressed as From ( 2), it can be known that the inertia moment generated during the rotation of the flexible manipulator arouses the elastic vibration of the manipulator, which can be controlled by optimizing the trajectory of the manipulator during the working process to suppress the vibration of the manipulator.In order to improve the optimization efficiency and the search speed, the basic displacement value of the trajectory control point can be obtained by discretely using a reference trajectory curve.In this paper, a quintic polynomial is used as the reference trajectory curve; it is expressed as where t f is the ending time; θ 0 and θ f are the positions of the start and end times of the manipulator, respectively.After obtaining the reference curve, sufficient nodes are taken in the reference trajectory curve, and then some floating changes to the basic value are made.By adding the interpolation point increment to change the position of each interpolation point, a new set of interpolation point values are obtained.Then, different trajectory curves are obtained by curve fitting.As shown in Figure 3, the dotted line represents the initial trajectory, and the solid line is the optimization trajectory.Since the speed and acceleration of the underwater manipulator are limited by the rated power and working environment, the speed and acceleration constraints need to be satisfied in the optimization process, and the cubic polynomial function has second-order derivability at both the interpolation point and the interpolation interval; it has good stability and it is easy to calculate the velocity and acceleration.Therefore, after the trajectory control points are obtained, the cubic polynomial interpolation function is used to fit the obtained two adjacent control points.
The joint angle at the i-th trajectory control point can be expressed in the following form: where θ Bi is the basic value of the trajectory control point and ∆θ i−1 is its floating value.
the solid line is the optimization trajectory.Since the speed and acceleration of the underwater manipulator are limited by the rated power and working environment, the speed and acceleration constraints need to be satisfied in the optimization process, and the cubic polynomial function has second-order derivability at both the interpolation point and the interpolation interval; it has good stability and it is easy to calculate the velocity and acceleration.Therefore, after the trajectory control points are obtained, the cubic polynomial interpolation function is used to fit the obtained two adjacent control points.The joint angle at the i-th trajectory control point can be expressed in the following form: where Bi  is the basic value of the trajectory control point and  is its floating value.Let i t be the corresponding time series at node i, and Qt is a cubic polynomial over the time interval 1 [ , ] ii tt + .Since the second derivative of () Qt is a linear function, it can be expressed as where  Let t i be the corresponding time series at node i, and Q i (t) is a cubic polynomial over the time interval [t i , t i+1 ].Since the second derivative of Q i (t) is a linear function, it can be expressed as where h i = t i+1 − t i , and the interpolation function Q i (t) can be obtained by integrating Q i (t) twice and substituting the node conditions In order to determine the undetermined coefficient of the cubic fitting function, each selected interpolation point should satisfy the joint trajectory function over the interpolation point, the joint trajectory function continuity, the joint trajectory first-order derivative function continuity and the joint trajectory second-order derivative function continuity.Coupled with the upper boundary conditions, the following equations in matrix form can be obtained [17]: In this paper, the trajectory planning adopts uniform interpolation and h i = h.D is the matrix describing the continuous relationship of the interpolation curve, which can be expressed as The matrix b can be expressed as where ω 0 and ω f are the angular velocities at the start time and the end time, and a 0 and a f are the angular acceleration at the start time and the end time.
In (8), the matrix is an upper triangular matrix, and each element on the diagonal is greater than zero; thus, this is a non-singular matrix.Therefore, the unique solution of ] can be calculated.By substituting the solution into (21), the values of trajectory control point 2 and point n-2 can be obtained.

Constraint Condition
When the underwater manipulator is working, the angular velocity and angular acceleration are limited by the rated power and working environment.The joint angular velocity and angular acceleration constraints of the i-th trajectory control point of joint j can be expressed as where ωC j is the velocity constraint for joint j, aC j is the acceleration constraint for joint j, and the joint angular velocity is a quadratic polynomial.The maximum of the absolute value of the angular velocity exists at the endpoint t i , t i+1 or extreme point t i .The velocity constraint can be expressed as where From the condition of the extreme point that Q ji (t i ) = 0, we can derive that Since the joint angular acceleration is a first-order polynomial, and the maximum value of the instantaneous velocity can only be obtained at the endpoint, the joint angular acceleration constraint can be expressed as max Q ji (t) = max a j1 , a j2 , . . ., a jn ≤ aC j (17) In addition, in order to improve the safety performance of the flexible manipulator, it is necessary to limit the amplitude of the manipulator, and the vibration constraint can be expressed as

Objective Function
In order to minimize the vibration of the flexible manipulator, the objective function of vibration suppression trajectory planning based on the accumulation of vibration displacement at the end of the flexible manipulator is proposed: The first half of the objective function is used to measure the vibration deviation of the flexible manipulator during the movement process.The latter part of the objective function is used to measure the residual vibration of the flexible manipulator in time interval t f to 3t f after the motion stops.α 1 and α 2 are weight factors.

PSO Algorithm
For a d-dimensional optimization problem, suppose that the position and velocity of the particle are ).The particle individual optimal solution is recorded as P i = (p i,1 p i,2 . . .p i,d ), and the global optimal solution currently found from the whole group is recorded as P g = (p g,1 p g,2 . . .p g,d ).The particles update their position and velocity according to the following rules [35]: where is the inertia weight, c 1 and c 2 are positive learning factors, and ς 1 , ς 2 are random numbers evenly distributed from 0 to 1.The speed update formula of a PSO algorithm with a shrinkage factor is [36] v i,j (t where C = c 1 + c 2 to ensure the smooth solution of the algorithm.PSO is an optimization method without variable constraints.For the application of the PSO algorithm in constrained optimization problems, researchers have proposed a series of schemes to solve constrained optimization problems.Among them, the penalty function method is the most widely used because of its simple design and stable calculation results [23,24].In this paper, the penalty function method is introduced to expand the objective function to deal with the constraints.The new objective function is expressed as where K p is the penalty factor, and g i (x) is the constraint discriminant.When the constraint is satisfied, The steps of the particle swarm optimization algorithm for vibration suppression trajectory planning are as follows.Firstly, when the trajectory of the end actuator of the manipulator is known, the joint motion trajectory can be obtained through inverse kinematics, as shown in the dashed blue frame in Figure 4.The initial value of the joint interpolation point increment is generated by tent chaotic mapping, and the value of the discrete trajectory control point is obtained by (4), ( 6) and (10).Secondly, the discrete trajectory control points are fitted segmentally by using a cubic polynomial to obtain the angular displacement, angular velocity and angular acceleration of the trajectory to be optimized.Next, the dynamic equation of the system is calculated through (2) to obtain the vibration mode of the flexible manipulator.Then, the objective function is calculated according to (22) and the speed is updated according to (21) until the maximum iterative steps are reached.Finally, the optimal variables are output and the optimal trajectory is obtained by cubic polynomial fitting.The entire process is shown in Figure 4. ) 1 ( i gx=− .The steps of the particle swarm optimization algorithm for vibration suppression trajectory planning are as follows.Firstly, when the trajectory of the end actuator of the manipulator is known, the joint motion trajectory can be obtained through inverse kinematics, as shown in the dashed blue frame in Figure 4.The initial value of the joint interpolation point increment is generated by tent chaotic mapping, and the value of the discrete trajectory control point is obtained by (4), ( 6) and (10).Secondly, the discrete trajectory control points are fitted segmentally by using a cubic polynomial to obtain the angular displacement, angular velocity and angular acceleration of the trajectory to be optimized.Next, the dynamic equation of the system is calculated through (2) to obtain the vibration mode of the flexible manipulator.Then, the objective function is calculated according to (22) and the speed is updated according to (21) until the maximum iterative steps are reached.Finally, the optimal variables are output and the optimal trajectory is obtained by cubic polynomial fitting.The entire process is shown in Figure 4.

Sparrow Search Algorithm (SSA)
SSA is a new heuristic optimization algorithm, the position update strategy of the sparrow algorithm is richer than that of PSO and it has better optimization ability in benchmark functions and certain applications [28].There are two types of sparrows in sparrow algorithms, namely the discoverer and follower, and the proportion of discoverers in the population is set as PD.Discoverers with better fitness values will give priority to obtaining food in the search process and providing the direction of foraging for the followers.Therefore, the foraging search range of the discoverer is larger than that of the followers.For a d-dimensional optimization problem, the position information of the i-th sparrow can be expressed as X i = x i1 x i2 . . .x id .During each iteration, the discoverer updates the position according to the following rules: where itermax is the maximum number of iterations, γ ∈ [0, 1] is a random number, R e ∈ [0, 1] represents the early warning value, ST ∈ [0.5, 1] represents the safety value, Ψ is a random number subject to a normal distribution, and L stands for a 1 × d-dimensional matrix in which each element is l.When R e < ST, there is no predator in the foraging environment, and the discoverer can conduct an extensive search operation; when R e ≥ ST, some sparrows spot predators and send an early warning to others, and all sparrows need to fly to a safe area.
During foraging, some followers will always monitor the discoverer.Once they realize that the discoverer has found better food, they will leave to compete with the discoverer.If they win, they can immediately obtain the food of the discoverer and execute the rule as the discoverer (23); otherwise, they continue to execute the rule (24).The position update of participants is described as follows: where X p is the best position of the current discoverer, and X w is the worst position in the current global situation.E stands for a 1 × d-dimensional matrix in which each element is randomly assigned 1 or −1 and E + = E T (EE T ) −1 .When i > n/2, it indicates that the i-th follower has a low fitness value, and it needs to fly to other places to obtain more energy.
In addition, the sparrow algorithm assumes that some sparrows in the population perceive danger.The proportion of these sparrows is set as SD, and their initial positions are randomly generated in the population.If the individual fitness value of these sparrows is greater than the current global optimal fitness value, it means that the sparrow is on the verge of being attacked by predators.When the individual fitness value of these sparrows is equal to the current global optimal fitness value, it means that the sparrow is aware of the danger and needs to be close to other sparrows to minimize the risk of predation.It can be expressed as follows: where X g is the current global optimal location, β is the step control parameter, K r ∈ [−1 , 1] is a random number indicating the moving direction and step size, and ε is a small constant.f i is the fitness value of the current sparrow; f g and f w are, respectively, the current global best and worst fitness values.

Improved Sparrow Search Algorithm (ISSA)
In order to improve the global search ability of the sparrow optimization algorithm and reduce the risk of falling into local optima, this paper integrates the sine cosine algorithm (SCA) and elite opposition learning strategy into the sparrow algorithm, and proposes a new, improved sparrow algorithm.The SCA algorithm has a simple structure, few parameter settings and easy implementation, offering certain advantages over PSO and GA in some optimization examples.SCA carries out global exploration and local development according to the oscillation change of the sine cosine model.The position update formula of the standard SCA is as follows [37]: where X best is the best individual of the group after the t-th iteration; ς 4 , ς 5 and ς 6 are random numbers, and is a constant indicating the probability of switching between sine and cosine.ς 3 is the conversion parameter.(27) where a r is a preset constant, t is the current iteration, and itermax is the maximum number of iterations.
The improved sparrow algorithm introduces the sine algorithm into the position update formula of the discoverer of the standard sparrow search algorithm; it is described as follows: The elite opposition-based learning strategy seeks to find the reverse solution for some elite individuals, and then liberate the reverse solution of elite individuals into the population to participate in competition [38].It is proven that this method can effectively improve the search ability of intelligent optimization algorithms.The improved sparrow algorithm uses the inverse solution of elite points to further update the sparrow position after sparrow optimization.The elite group is represented by X e .The proportion of elite groups is ED.X ei = (x ei,1 , x ei,2 , . . ., x ei,d ) ∈ [ , u] is an elite point in d-dimensional space, and its inverse solution X ei = (x i,1 , x i,2 , . . ., x i,d can be expressed as where k is a constant.When f (X ei ) > f (X ei ), we take X ei as the elite individual of the next iteration to replace X ei .Then, we calculate the global optimal position of the group and rearrange the new sparrow population.The steps of trajectory optimization of flexible manipulators by using ISSA are as follows.Firstly, the initial value is generated by tent chaotic mapping, and then the objective function is calculated according to (19).The positions of the discoverer, follower and early warning sparrow are updated, respectively, according to (28), ( 24) and (25), and then the position of the sparrow is further updated through the opposition-based learning of the elite solution, until the optimization variable that minimizes the objective function of the flexible manipulator is found.Finally, the optimal variables are output and the optimal trajectory is obtained by cubic polynomial fitting.The entire process is shown in Figure 5.
early warning sparrow are updated, respectively, according to (28), ( 24) and (25), and then the position of the sparrow is further updated through the opposition-based learning of the elite solution, until the optimization variable that minimizes the objective function of the flexible manipulator is found.Finally, the optimal variables are output and the optimal trajectory is obtained by cubic polynomial fitting.The entire process is shown in Figure 5.

Simulation
To verify the effectiveness of the proposed ISSA in vibration suppression trajectory optimization, the flexible manipulator shown in Figure 2 is used as an example for optimization simulation, and compared with the traditional PSO algorithm, SSA and OBLSSA.The simulation is carried out in the Matlab2020 environment, using the 10-core parallel operation provided by the National Supercomputing Center in Jinan, China.The size of the manipulators in the simulation is l 1 = 0.975 m, l 2 = 1 m; the density is ρ 1 = 13.507,ρ 2 = 12.363; the bending stiffness of the flexible link is EI = 125 N • m 2 .The parameters of the manipulator are shown in Table 1.In the selection of the initial parameters, we refer to some existing methods [19,26] and study the sensitivity of some important parameters.The selected parameters can ensure that the 4 optimization algorithms have good performance.Firstly, the trajectory optimization effects of the traditional PSO, SSA, OBLSSA and ISSA for the underwater flexible manipulator are studied under two conditions: considering the influence of gravity (the resultant force of gravity and buoyancy is 0.1 times that of gravity) and not considering the influence of gravity (the resultant force of gravity and buoyancy is zero).In this case, the accelerations at the initial and termination moments are known and the accelerations are zero.The starting position is set as θ 0 = [0,0], and the target position is set as θ f = [π/4, π/2]; the weight coefficient of objective function α 2 = 0, seven groups of time points are evenly selected, and the optimization parameters are set as [∆θ 13 , ∆θ 14 , ∆θ 15 , ∆θ 23 , ∆θ 24 , ∆θ 25 ].The dynamic equation of the flexible manipulator is solved by the fourth-order Runge-Kutta method, and the number of data points is taken as Num = 500.The corresponding sampling step is taken as 2π/499; the joint angle, velocity and acceleration constraints are |θ| max = .θ max = .. θ max = 2; the maximum flexible vibration displacement is 0.1 m.The size of the population is N, and the dimension of the optimization problem is recorded as d; the parameters of several optimization algorithms are shown in Table 2.After iterative operation, an optimal trajectory consisting of three cubic polynomial trajectories can be obtained.Figure 6a shows the evolution process of the four optimization algorithms without considering the influence of gravity, and Figure 6b shows the evolution process of the four optimization algorithms considering the influence of gravity.In order to eliminate the influence of accidental factors, each optimization algorithm is implemented three times to take the average.The optimization results are shown in Table 3.It can be seen from Figure 6a and Table 3 that, compared with the other three algorithms, SSA falls into the local optimum earlier; the OBLSSA optimization results are improved compared with SSA; the optimization result of PSO is better than that of SSA and OBLSSA, but the optimization time is much longer than that of the other three algorithms; ISSA improves the global search ability, and the search accuracy and convergence speed are better than for the other three optimization algorithms.Combined with Figure 6b and Table 3, it can be seen that the optimization effect of the SSA optimization algorithm is better than that of the PSO optimization algorithm.Under the set parameters, the best fitness values of the optimization trajectories when using the OBLSSA optimization algorithm are not improved compared with the use of SSA.This may be due to the increase in random factors in the process of generating elite solutions and controlling the boundaries of elite solutions, which reduces the accuracy of the optimization results.The ISSA optimization algorithm combines the advantages of the strong global search ability of the sine and cosine algorithm and opposition elite learning to avoid falling into local optima, and it overcomes the influence of random factors.Figure 7 shows the optimized trajectory without considering the influence of gravity.It can be seen from Figure 7 that the interpolation point increment of the ISSAoptimized trajectory is much larger than that of the SSA optimization algorithm.Figure 8 is the optimized trajectory considering the influence of gravity.Compared with Figure 7, it can be seen that the curvature of the optimized trajectory when gravity's influence is considered is greater than that when gravity's influence is not considered, which is caused by the inherent vibration characteristics of the manipulator.Figure 9a shows the flexible displacement at the end of the manipulator under each optimized trajectory when the influence of gravity is not considered.Compared with the non-optimized trajectory, the flexible vibration at the end of the manipulator based on the SSA-and ISSA-optimized trajectories is significantly suppressed in the first 4 s, and the total vibration is smaller than that of the non-optimized trajectory.The vibration accumulation and maximum vibration displacement of the manipulator optimized by ISSA are obviously lower than those of the one optimized by SSA. Figure 9b shows the flexible displacement at the end of the manipulator generated by the SSA-and ISSA-optimized trajectories when the influence of gravity is considered.Compared with the non-optimized trajectory, the flexible vibration is effectively suppressed at 1.5-4 s.Due to the large flexible displacement caused by gravity, the vibration displacement reduced by trajectory planning is not obvious compared with the total flexible displacement.values of the optimization trajectories when using the OBLSSA optimization algorithm are not improved compared with the use of SSA.This may be due to the increase in random factors in the process of generating elite solutions and controlling the boundaries of elite solutions, which reduces the accuracy of the optimization results.The ISSA optimization algorithm combines the advantages of the strong global search ability of the sine and cosine algorithm and opposition elite learning to avoid falling into local optima, and it overcomes the influence of random factors.Figure 7 shows the optimized trajectory without considering the influence of gravity.It can be seen from Figure 7 that the interpolation point increment of the ISSA-optimized trajectory is much larger than that of the SSA optimization algorithm.Figure 8 is the optimized trajectory considering the influence of gravity.Compared with Figure 7, it can be seen that the curvature of the optimized trajectory when gravity's influence is considered is greater than that when gravity's influence is not considered, which is caused by the inherent vibration characteristics of the manipulator.Figure 9a shows the flexible displacement at the end of the manipulator under each optimized trajectory when the influence of gravity is not considered.Compared with the non-optimized trajectory, the flexible vibration at the end of the manipulator based on the SSA-and ISSA-optimized trajectories is significantly suppressed in the first 4 s, and the total vibration is smaller than that of the non-optimized trajectory.The vibration accumulation and maximum vibration displacement of the manipulator optimized by ISSA are obviously lower than those of the one optimized by SSA. Figure 9b shows the flexible displacement at the end of the manipulator generated by the SSA-and ISSA-optimized trajectories when the influence of gravity is considered.Compared with the non-optimized trajectory, the flexible vibration is effectively suppressed at 1.5-4 s.Due to the large flexible displacement caused by gravity, the vibration displacement reduced by trajectory planning is not obvious compared with the total flexible displacement.When the acceleration at the initial and terminal times is not zero and is unknown, the residual vibration will interfere with the control of the manipulator after the joint stops moving.In order to study the influence of residual vibration on the optimization of the vibration suppression trajectory, the paper discuss the trajectory optimization effect of PSO, SSA, OBLSSA and ISSA for underwater flexible manipulators in α 2 = 1 and α 2 = 0.The starting position is set as θ 0 = [0, 0], and the target position is set as θ f = [π/4, π/2].The resultant force of gravity and buoyancy is zero.Seven groups of time points are evenly selected, and the joint angle increment at the middle time point and the initial acceleration of joint2 are taken as the parameters to be optimized.The optimization parameters can be expressed as [∆θ 13 , ∆θ 14 , ∆θ 15 , ∆θ 23 , ∆θ 24 , ∆θ 25 , .. Figure 10a shows the optimization processes of four optimization algorithms at α 2 = 1.Combining these with Table 3, it can be seen that the optimization result of SSA is better than that of the PSO optimization algorithm.The optimization point obtained by the PSO optimization algorithm in the initial stage of optimization exceeds the constraint boundary.Due to the effect of the penalty function, it overcomes the constraints and obtains a good optimization result.The fitness value of the OBLSSA optimization result is lower than that of SSA, which is related to the increase in random factors in the process of generating and controlling the boundary of the elite solution.The ISSA optimization algorithm combines the global search ability of the sine and cosine algorithm and opposition elite learning to avoid falling into the local optimum and overcome the influence of random factors, obtaining better results than other algorithms.Figure 10b shows the optimization processes of four optimization algorithms at α 2 = 0, The optimization points obtained by the PSO optimization algorithm in the initial stage of optimization also exceed the constraint boundary.According to Table 3, it can be seen that the optimization results of the three sparrow optimization algorithms are better than those of the PSO.The OBLSSA optimization algorithm reverse elite solution works in overcoming the local optimum.The optimization results are better than those of the SSA optimization algorithm, and ISSA improves the global search ability and avoids falling into the local optimum, and it obtains optimization results that are better than those of other algorithms.By comparing the optimal fitness values obtained by the four optimization algorithms in Table 3, it can be seen that the fitness values of SSA, OBLSSA and ISSA when α 2 = 1 are greater than those when α 2 = 0.This is because we add the residual vibration after the joint motion stops.The fitness value of the PSO algorithm when α 2 = 1 is less than that when α 2 = 0; this may be caused by the PSO algorithm falling into the local optimum.Figures 11 and 12, respectively, show the joint optimization trajectories when α 2 = 1 and α 2 = 0. Figure 13 shows the comparison of the optimization trajectories of ISSA when α 2 = 1 and α 2 = 0. Compared with the joint optimization trajectory when α 2 = 0, the joint optimization trajectory has smaller curvature and a smaller interpolation point increment when α 2 = 1. Figure 14 shows the vibration displacement of the manipulator endpoint.It can be seen from Figure 14a that the residual vibration of the trajectory optimized by SSA and ISSA is significantly suppressed at t = [t f , 3t f ].It can be seen from Figure 14a,b that the vibration suppression is mainly within 1-5 s, and the vibration amount of the optimized trajectory by ISSA is less than that by SSA.Although the amplitude of residual vibration is less than that in the process of motion, the accumulation of residual vibration will also have a great impact on the optimization results.

Case
the constraint boundary.According to Table 3, it can be seen that the optimization results of the three sparrow optimization algorithms are better than those of the PSO.The OBLSSA optimization algorithm reverse elite solution works in overcoming the local optimum.The optimization results are better than those of the SSA optimization algorithm, and ISSA improves the global search ability and avoids falling into the local optimum, and it obtains optimization results that are better than those of other algorithms.By comparing the optimal fitness values obtained by the four optimization algorithms in Table 3, it can be seen that the fitness values of SSA, OBLSSA and ISSA when 2 =1   are greater than those when 2 =0   .This is because we add the residual vibration after the joint motion stops.The fitness value of the PSO algorithm when 2 =1   is less than that when 2 =0  ; this may be caused by the PSO algorithm falling into the local optimum.Figure 11 and Figure 12, respectively, show the joint optimization trajectories when 2 =1   and  .Figure 13 shows the comparison of the optimization trajectories of ISSA when  and 2 =0  .Compared with the joint optimization trajectory when 2 =0  , the joint optimization trajectory has smaller curvature and a smaller interpolation point increment when 2 =1  .Figure 14 shows the vibration displacement of the manipulator endpoint.It can be seen from Figure 14a that the residual vibration of the trajectory optimized by SSA and ISSA is significantly suppressed at It can be seen from Figure 14a,b that the vibration suppression is mainly within 1-5 s, and the vibration amount of the optimized trajectory by ISSA is less than that by SSA.Although the amplitude of residual vibration is less than that in the process of motion, the accumulation of residual vibration will also have a great impact on the optimization results.Remark 2. The optimized objective function is the accumulation of vibration displacement in the whole optimization process.In Figure 14b, although the vibration accumulation of SSA is smaller than that of ISSA in the first 4 s, the vibration accumulation of the SSA optimization algorithm Remark 2. The optimized objective function is the accumulation of vibration displacement in the whole optimization process.In Figure 14b, although the vibration accumulation of SSA is smaller than that of ISSA in the first 4 s, the vibration accumulation of the SSA optimization algorithm increases sharply in the following seconds, resulting in a total vibration accumulation greater than that of ISSA.
To further analyze the optimization performance of the four optimization algorithms, two optimization performance indicators, the average optimization percentage λ and average relative optimization time κ, are introduced.
where F n is the non-optimized objective function value, F is the optimized objective function value, t is the optimization time, and t I is the optimization time of the ISSA algorithm.
The optimization performance indicators are shown in Table 4.According to Table 4, the ISSA algorithm takes only 1/3.68 of the time of PSO.Compared to PSO, SSA and OBLSSA, the optimization performance is improved by 17.3%, 13.1% and 9.7%, respectively.This is because the PSO algorithm and the SSA algorithm are more likely to fall into the local optimum compared with OBLSSA and ISSA.The introduction of the opposition learning strategy improves the optimization ability of SSA to a certain extent, but random factors are added in the process of generating and controlling the boundary of the elite solution, which will affect the optimization accuracy of OBLSSA.As the application of SA in ISSA overcomes the effects of random factors, compared with the other three optimization algorithms, ISSA has higher optimization accuracy and a faster convergence speed and obtains a good vibration reduction effect.

Incremental Kriging-Assisted ISSA
The numerical simulation in Section 4 verifies that the ISSA-based vibration suppression trajectory planning method can obtain better optimization results.Due to the long optimization time, ISSA is difficult to be directly applied in practice.In order to achieve a fast online search of vibration suppression trajectories, neural networks and intelligent algorithms are used as optimal path generators [19], which can generate vibration suppression trajectories in real time after the start and end positions of the joint angle are given.These methods require a large number of optimization results as sample data.To obtain a large amount of optimized trajectory data in a shorter time, this paper uses an incremental Kriging model based on an improved additive point criterion to construct a global surrogate model, and combines the ISSA optimization algorithm to train the model.

Incremental Learning Kriging Model
Data-driven technology has great potential in engineering applications [39].The Kriging model is widely used in engineering optimization because of its good robustness and nonlinear approximation capability [40,41].The Kriging model introduces statistical assumptions to represent the objective function as a stochastic process as follows.
The following Gaussian correlation function is often used for the Kriging model: The estimated value of the model is expressed as The mean square deviation of the estimated value is expressed as where ϑ, µ, σ 2 are hyperparameters and θ, μ, σ2 are the corresponding maximum likelihood estimations.
The training complexity of the Kriging model mainly comes from the optimization of the hyperparameters, which requires solving the correlation matrix R and its inverse.The Cholesky decomposition can improve the accuracy of the numerical solution.The Cholesky decomposition of the correlation matrix R can be expressed as The training and updating of the Kriging model have O(n 3 ) complexity.Since each new piece of data is a small amount, it is not necessary to completely retrain the current Kriging model, but only to learn the effect of the new data on the current Kriging model.The incremental Kriging model approach proposed by Zhan and Xing can significantly reduce the computational complexity and greatly shorten the surrogate model construction time by chunking the incremental relationship matrix R with respect to old data and new data [42].
where A, B is the incremental matrix of new data.For the new data with q incremental points, we can obtain After obtaining the incremental relationship matrix R and the incremental matrices A, B, the trained Kriging model can be obtained, and then the predicted values and predicted standard deviations of the unknown points can be obtained by the new Kriging model.

Infill Criteria
At present, the most commonly used infill criteria include the MSP and EI criteria.The MSP criterion aims to find the optimal solution x * of the objective function directly on the surrogate model, and then obtain the exact solution of x * as new sample data.The EI criterion finds the point with the highest probability of improvement of the objective function as a new sample point.The probability value of EI improvement can be expressed as where y min is the current optimal response function value, Φ is the standard normal cumulative distribution function, and ϕ is the standard normal probability density function.Similar methods are used to establish the Kriging model of constraint g i (x), Then, the probability of satisfying the constraint at any position is The EI value with constraints is expressed as Studies have shown that the combination of the MSP criterion and EI criterion has a better optimization effect than a single infill criterion [43].The IKA-ISSA used in this paper constructs an incremental Kriging model based on the MSP + EI hybrid infill criterion and combines the ISSA optimization algorithm to train the model.The IKA-ISSA optimization process is shown in Algorithm 1.

Else
Update the Kriging model: generate new Kriging models kriging_model1, kriging_model2 based on the Kriging model from the previous learning increment step generation and the sample set increments in f ill_x, in f ill_y1, in f ill_y2.End if 6. ISSA optimization: set the optimal population P, obtain the predicted value of the population sample based on the initial Kriging model and perform K iterations of ISSA optimization to obtain the optimized population P1. 7. Generate candidate increment set: merge similar individuals in population P1 to generate population P2.Remove points in population P2 that are similar to sample set sample_x as candidate increment set P_candi. 8. Generate increment sets: select sample set increments in f ill_x, in f ill_y1, in f ill_y2 from the candidate increment set P_candi based on MSP + EI infill criterion and Kriging model.9. Generate objective function values of infill points: obtain the response value in f ill_y1 and the constraint value in f ill_y2 for the sample set increment through the dynamic model and calculate the objective function in f ill_y for the increment sample set.10.Update variables: update the sample sets sample_x, sample_y1, sample_y2; update Nt and generation; update the optimal value y_min and the corresponding optimal point x_min.11.End while 12.Output optimal solution: Output y_min and x_min.
From Figure 15, it can be seen that the vibration accumulation of the optimized trajectory is significantly smaller than that of the non-optimized trajectory, and the optimized result of IKA-ISSA is slightly different from that of ordinary ISSA after a short learning and training period, and even better than that of ordinary ISSA in some cases.Figure 16 shows the optimization times of the two methods.IKA-ISSA takes less than 3% of the time of ISSA, among which the time to generate the initial sample set accounts for a large proportion, which is caused by the complex dynamic calculation.In addition, the learning and training time of IKA-ISSA is much less than that of ISSA optimization training, which indicates that IKA-ISSA integrates the strong nonlinear approximation ability of the incremental Kriging model and the high search efficiency of ISSA.
From Figure 15, it can be seen that the vibration accumulation of the optimized trajectory is significantly smaller than that of the non-optimized trajectory, and the optimized result of IKA-ISSA is slightly different from that of ordinary ISSA after a short learning and training period, and even better than that of ordinary ISSA in some cases.Figure 16 shows the optimization times of the two methods.IKA-ISSA takes less than 3% of the time of ISSA, among which the time to generate the initial sample set accounts for a large proportion, which is caused by the complex dynamic calculation.In addition, the learning and training time of IKA-ISSA is much less than that of ISSA optimization training, which indicates that IKA-ISSA integrates the strong nonlinear approximation ability of the incremental Kriging model and the high search efficiency of ISSA.

Conclusions
In this paper, ISSA combining an elite strategy and the sine algorithm is proposed for the trajectory planning of underwater flexible manipulators.The simulation results show From Figure 15, it can be seen that the vibration accumulation of the optimized trajectory is significantly smaller than that of the non-optimized trajectory, and the optimized result of IKA-ISSA is slightly different from that of ordinary ISSA after a short learning and training period, and even better than that of ordinary ISSA in some cases.Figure 16 shows the optimization times of the two methods.IKA-ISSA takes less than 3% of the time of ISSA, among which the time to generate the initial sample set accounts for a large proportion, which is caused by the complex dynamic calculation.In addition, the learning and training time of IKA-ISSA is much less than that of ISSA optimization training, which indicates that IKA-ISSA integrates the strong nonlinear approximation ability of the incremental Kriging model and the high search efficiency of ISSA.

Conclusions
In this paper, ISSA combining an elite strategy and the sine algorithm is proposed for the trajectory planning of underwater flexible manipulators.The simulation results show that ISSA has the advantages of the global search ability of the sine and cosine algorithm

Conclusions
In this paper, ISSA combining an elite strategy and the sine algorithm is proposed for the trajectory planning of underwater flexible manipulators.The simulation results show that ISSA has the advantages of the global search ability of the sine and cosine algorithm and the reverse elite learning ability to avoid falling into local optima.It is more computationally efficient than the PSO algorithm, and the average time consumption is only 1/3.68 of that of the PSO algorithm.In order to solve the problem of the long optimization time of ISSA, this paper further proposes IKA-ISSA, which integrates the strong nonlinear approximation capability of the incremental Kriging model and the high search efficiency of ISSA to greatly reduce the time required for optimization and ensure the accuracy of optimization.This method can obtain a large number of optimization results in a shorter time to construct real-time optimal path generators.
Author Contributions: Conceptualization, methodology, writing-original draft, writing-review and editing, H.H.; conceptualization, writing-review and editing, funding acquisition, supervision, resources, G.T.; investigation, software, data curation, H.C.; project administration, writing-review and editing, resources, J.W.; writing-review and editing, investigation, validation, L.H.; supervision, investigation, formal analysis, D.X.All authors have read and agreed to the published version of the manuscript.

Conflicts of Interest:
The authors declare that there are no competing interests.

Figure 1 .
Figure 1.UUV recovery and docking system on a submarine.

Figure 1 .
Figure 1.UUV recovery and docking system on a submarine.
and the interpolation function () i Qt can be obtained by integrating () i Qt  twice and substituting the node conditions

Figure 6 .
Figure 6.Optimization process of optimization algorithms: (a) without gravity effect; (b) with gravity effect.Figure 6. Optimization process of optimization algorithms: (a) without gravity effect; (b) with gravity effect.

Figure 6 .
Figure 6.Optimization process of optimization algorithms: (a) without gravity effect; (b) with gravity effect.Figure 6. Optimization process of optimization algorithms: (a) without gravity effect; (b) with gravity effect.

Figure 14 .Remark 1 .
Figure 14.Manipulator endpoint flexible displacement: (a) α 2 = 1; (b) α 2 = 0.Remark 1.Since the initial value of the joint interpolation point increment is automatically generated by tent chaotic mapping, different optimization algorithms will have different initial fitness values, as shown in Figures6 and 10.The fitness value of the PSO algorithm in Figure10in the early iteration is much higher than that of other optimization algorithms, which is caused by the action of the penalty function.

Algorithm 1 . 1 . 2 .
Optimization process of IKA-ISSA.Parameters: number of sample points Nt, maximum number of sample points Nm, learning increment step of Kriging model generation Initial sample set generation: Latin superelevation method to generate N initial design points sample_x.the response value of vibration accumulation sample_y1 and the maximum flexible displacement constraint value sample_y2 obtained by the dynamic model.Generate objective function values: generate objective function y with penalty factors based on response and constraint values and rank y to obtain the optimal value y_min.3.While Nt < Nm do 4.If generation = = 1 Generating the initial Kriging model: the initial sample set is used to generate the responding Kriging model kriging_model1 and the constrained Kriging model kriging_model2, respectively.

Figure 16 .
Figure 16.Optimization time of vibration suppression trajectory planning.

Figure 16 .
Figure 16.Optimization time of vibration suppression trajectory planning.

Figure 16 .
Figure 16.Optimization time of vibration suppression trajectory planning.

Funding:
This research is supported by the National Natural Science Foundation of China (No. 51979116); the HUST Interdisciplinary Innovation Team Project (No. 2020JYCXJJ063); and the Wuhan Science and Technology Project (No. 2020010602012052).Institutional Review Board Statement: Not applicable.Informed Consent Statement: Not applicable.Data Availability Statement:The Matlab codes of IKA-ISSA and ISSA can be obtained from the website https://pan.baidu.com/s/1AfesaXXT5hlV8TlgLDQFIA?pwd=zyip (accessed on 27 March 2023) by using the password zyip.

Table 1 .
Parameters of underwater flexible manipulator.
A nomenclature table for variables and abbreviations in the paper is provided as follows: Bi Joint angle of the i-th trajectory control point Num The number of data points for the fourth-order Runge-Kutta model ∆θ i Floating value of the i-th trajectory control point EI EI criterion θ Bi Basic value of the i-th trajectory control point E c I EI criterion with constraints Q i Cubic polynomial over the time interval [t i , t i+1 ] Y Objective function ω 0 , ω f Angular velocities at the start time and the end time ϑ, µ, σ 2 Hyperparameters a 0 , a f Angular acceleration at the start time and the end time Z Gaussian process with mean zero