Comprehensive research and analysis on obstacle–singularity–joint limit avoidance of redundant robot

Redundant robots can complete other tasks while performing main task and have excellent motion performance. Although redundant robots have redundancy characteristics, they may still fall into singular configuration or cannot overcome joint limits due to the limitation of their own structure and motion law. Besides, currently, most of the research mainly focus on obstacle avoidance at the end of the robot. So comprehensive study is conducted on avoidance of obstacle, singularity, and joint limit of redundant robot. Firstly, the kinematics model of robot is obtained by D-H matrix method. Space vector distance method is proposed to calculate the position relationship between robot and obstacle, and potential function is constructed. Based on gradient projection method, using the damped generalized inverse and the weighted norm method, the mathematical models of obstacle avoidance, singularity avoidance, and joint limit avoidance are constructed. The simulation results show that the robot can avoid the obstacle in three-dimensional redundant space. At the same time, manipulability and minimum singular value of the robot are always positive. After adding the function of avoiding joint limit, during the whole control process, the motion range of joint angle is reduced and the angular velocity is relatively small, which ensure the motion stability of robot. Namely, the singular configuration and joint limit of robot are avoided. The research is of great significance for practical application of redundant robot.


Introduction
Redundant robots have significant advantages such as good motion performance and strong fault-tolerant ability.Their redundant degrees of freedom (DOF) can be used to complete other tasks such as obstacle avoidance and singularity avoidance while performing main task.Redundant robots have been widely studied and developed rapidly due to their high flexibility in geometric structure. 1Currently, many scholars have conducted relevant research on redundant robots, focusing on configuration analysis, obstacle avoidance, motion optimization, and control.3] Liu et al. 4 proposed an end-effector trajectory planning method based on multiobjective optimization to solve the collision problem during the motion of redundant manipulators.A multiobjective and multioptimization trajectory model considering obstacle avoidance, joint speed, joint jitter, and energy consumption is established and optimized by using multiobjective particle swarm optimization algorithm.Li et al. 5 studied the problem of avoiding dynamic obstacles in physical human-robot interaction with redundant robot and proposed a hierarchical reprogramming framework to rapidly modulate the ongoing trajectory to help seven-DOF redundant manipulator avoid dynamic obstacles in physical human-robot interaction.Kim and Yang 6 proposed an algorithm combining dynamic window method and deep reinforcement learning to establish a speed model to avoid obstacles.Aiming at the lack of accurate modeling information in environmental modeling, Shou 7 designed an obstacle avoidance path planning algorithm for embedded robots based on machine vision.A fuzzy control method for obstacle avoidance path planning is designed, and a complete planning scheme is obtained.Guo et al. 8 proposed an avoidance method with dynamic obstacle avoidance risk area in a dynamic environment.Combined with nonlinear model predictive control, the robot can avoid dynamic obstacles safely.Tang et al. 9 proposed an obstacle avoidance method based on the hierarchical controller of deep reinforcement learning, which can realize more effective adaptive obstacle avoidance without path planning.Park et al. 10 proposed an algorithm that combines numerical method based on Jacobian matrix with the improved potential field to solve the real-time inverse kinematics and path planning problems of redundant robots in unknown environment.
With regard to kinematics optimization of redundant robots such as singularity avoidance, Liegois proposed the gradient projection method based on generalized inverse matrix, which can easily integrate different performance indicators into the control while ensuring the invariability of the robot's end motion law. 11Kazerounian and Nedungadi 12 derived the solution method of the least square problem of the minimum driving moment by using the Lagrange multiplier method.Only one generalized inverse is required, which avoids the disadvantage of requiring two generalized inverse and improves the computational stability.However, computational instability is not completely avoided.Baillieul 13,14 proposed the concept of augmented Jacobian matrix in the study of singular configuration avoidance and obstacle avoidance.Taking the quadratic optimization objectives of singular configuration avoidance and obstacle avoidance as additional constraints, the Jacobian becomes an augmented Jacobian matrix in the form of square matrix, and the inverse kinematics has a definite solution.Yoshikawa 15 defined manipulability to measure robot flexibility, which was widely used by researchers.Trutman et al. proposed a method of solving 7-DOF IK problem with quadratic polynomial objective function, obtained its global optimal solution, simplified the solving steps, and verified its feasibility. 16To achieve obstacle avoidance and optimal motion planning of robots, Lin et al. proposed an improved genetic algorithm to transform the motion planning problem into a global optimization problem for solution. 17n addition, the overlimit of joint motion is a common problem in motion planning and an important aspect to ensure the stable and safe operation of robot.For safety reasons, it is impossible for the joints of the robot to operate within the 360 range, and there are restrictions.Concerning the analysis of avoiding joint limits, Zhang et al. 18 studied the repetitive motion planning of PA10 redundant manipulator by primal-dual neural network based on linear variational inequalities.The physical constraints such as joint limits and joint velocity limits are incorporated into the problem formulation of such a redundancy-resolution scheme.The scheme is finally reformulated as a quadraticprogramming problem.Finally, the scheme and method are simulated successfully.So, the effectiveness is demonstrated.In the paper by Jia et al., 19 taking a nine-DOF redundant modular robot as the research object, trajectory optimization algorithm was proposed based on differential motion method.This method is suitable for iterative computation when performing variable gripper posture in Cartesian space.Avoiding joint limits was taken as an optimization index, and fault tolerance performance of robot was considered.Finally, the verification experiment of the optimization algorithm was carried out.
Overall, the current research mainly focuses on a single study such as obstacle avoidance and singularity avoidance.About obstacle avoidance, it mainly focuses on the obstacle avoidance at the end of the robot.Although the redundant robot has a self-motion range, it can still fall into a singular configuration or exceed the joint limit due to its own structure limitation.This seriously affects the safe operation of the robot.Then, comprehensive study is conducted on avoidance of obstacle, singularity, and joint limit of redundant robot.By locking part of the joints of 6-DOF SCHUNK robot, it is equivalent to a four-DOF redundant robot.Then, its kinematic model is established, and a comprehensive framework of obstacle-singularityjoint limit avoidance for redundant robot is established.Finally, the feasibility and effectiveness of the method are verified by simulation.

Robot model
The SCHUNK robot in the laboratory is taken as the research object to conduct relevant research.The fourth and sixth joints are locked and regarded as connecting rods.Then, the robot becomes a four-DOF redundant robot that can move in three-dimensional redundant space.The structure of the robot is shown in Figure 1.
According to the structure model of the robot, its diagram is shown in Figure 2.

Forward kinematics model
The D-H homogeneous matrix transformation method is used to solve the kinematics equation of the robot.According to the robot structure, the D-H parameters are shown in Table 1.
Then, the homogeneous transformation matrix between the end effector and the base is (1 where Therefore, the position equation of the robot is

Model of obstacle-singularity-joint limit avoidance
The velocity in Cartesian space is related to the velocity in joint space as follows where J is the Jacobian matrix of the robot, J is recorded as where , and A 3i ¼ @z @q i ði ¼ 1; 2; 3; 4Þ.
When analyzing the relationship between the speed of robot task space and the speed of joint space, the Jacobian matrix is the bridge between them.For redundant robot, the Jacobian is not a square matrix.According to gradient projection method, [20][21][22] by introducing a coefficient k, the joint velocity of the robot can be expressed as where H is an arbitrary velocity vector, ðI À J þ J Þ is a null space matrix, and J þ is the generalized inverse of the matrix J.The generalized inverse of Firstly, the obstacle avoidance problem of robot is studied.For the obstacle avoidance problem, it is necessary to make full use of their redundancy characteristics and use null space to adjust the position and posture of the robot without affecting the terminal motion, so as to achieve the goal of avoiding obstacle.When redundant robot performs an obstacle avoidance task, GðqÞ is the obstacle avoidance potential function, then H ¼ rGðqÞ.
The position of the robot and the obstacle is shown in Figure 3.
The location of obstacles is O i .The two endpoints of the robot's j-th link are E j and E jþ1 , respectively.The vertical distance between the obstacle and the robot link is OM ij .The intersection of OM ij and E j E jþ1 is vertical foot M ij .The distance d 1ij ¼ kO i M ij k.The distance between the obstacle O i and point According to the geometric relationship, it can be concluded that where u is the number of obstacles, and w is the number of robot links.It is also the number of the left end point of robot link.Each obstacle in the workspace can be contained in a sphere, and the geometric relationship between the robot and the obstacle can be used to construct an obstacle avoidance potential function.That is where Q 1 and Q 2 are constants, and r i is the radius of the sphere.
The homogeneous term of the robot's inverse solution is the task it performs, and it is denoted as When performing obstacle avoidance task, H 1 ¼ rGðqÞ, then where k 1 is the obstacle avoidance coefficient.
To analyze the obstacle avoidance effect of the robot, the minimum distance between the robot and the obstacle is denoted as d min , then When d min > r, obstacle avoidance is successful.When d min r, obstacle avoidance fails.
The generalized inverse method is generally used for the inverse solution of redundant robot.The essence of generalized inverse method is to solve the minimum norm solution of joint velocity under the premise of ensuring the minimum error of the end trajectory.To ensure the minimum tracking accuracy, the pseudo inverse method does not consider the joint velocity.When performing the task of avoiding singularity, it is necessary to adjust the motion law to avoid falling into a singular configuration.To prevent the joint velocity of robot near the singular configuration from being too large, damped generalized inverse method is used. 23amping coefficient, that is, singularity avoidance coefficient is introduced to adjust the priority levels of the end tracking accuracy and joint velocity, so that their priorities are consistent.Its essence is an optimization problem as described in equation ( 14) where _ P is the motion velocity in Cartesian space of the robot of the robot's end trajectory, J is the Jacobian matrix of the robot, and l is the singularity avoidance coefficient.
The solution of this optimization problem is where s m is the minimum singular value of Jacobian matrix, and s 0 is the lower limit of singular value.l 0 is the initial value of damping coefficient.
Since the damping coefficient is introduced to avoid singularity, the trajectory tracking accuracy will be reduced.Thus, the damping coefficient is expressed by a piecewise function.Damping coefficient threshold is set.When the robot is far away from singular position, that is, the current singular value is greater than the critical value, the singularity avoidance problem is not considered, and the conventional pseudo-inverse method is adopted.When the robot is close to the singular position, that is, the current singular value is smaller than the critical value, singularity avoidance problem is considered, and the singularityobstacle avoidance is carried out at the same time.
Besides, due to the structure of some joints themself, the whole circle movement cannot be carried out, while they can only move within a certain range.Therefore, it is necessary to avoid the joint limit.When performing the task of avoiding joint limits, it is recorded as H 2 ¼ U .Joint limit avoidance means that robot's joint angle is as close to the center of the angular range as possible.Here, the joint avoidance limit criterion is selected as the objective function to evaluate the distance between the current joint angle and the joint center.The function is projected to the null space of the Jacobian matrix to optimize the joint motion and avoid the joint limit as far as possible. 24It is defined as In equation (17), q imax and q imin are the upper and lower limits of the i-th joint q i , respectively.
The gradient vector rU ðqÞ of the joint avoidance limit optimization index is rU ðqÞ ¼ @U @q 1 ; @U @q 2 ; Á Á Á @U @q n !T (18) By establishing the above optimization model, the robot can avoid the limit position of joints as much as possible and maintain a good configuration.Define a new variable R, that is From equation (20), it is known that when q i !q imax or q i !q imin , U ðq i Þ ! 1, R ! 0. Therefore, the joint angular velocity _ q i !0 and q i are limited within the limit value.When q i !q imin þq imax 2 , U ðq i Þ !0, R ! 1, q i is not constrained.Therefore, selecting this formula can ensure that when the robot approaches the joint limit, the joint avoidance limit control strategy is activated.When the robot is far from the joint limit, it does not activate the joint avoidance limit task.
For redundant robot, the weighted minimum norm solution is where . A homogeneous self-motion item is added to the right end of the robot to avoid the joint limit.Therefore, when the robot only performs the task of avoiding the joint limit, H 2 ¼ Rx.Then, its motion rule is Namely, where k 2 is the optimization coefficient and x is the joint velocity vector.So, the comprehensive control model for obstacle-singularity-joint limit avoidance of redundant robot is Then

In case of obstacle avoidance
In case of obstacle avoidance, the simulation results are shown in Figures 4 to 8.
From Figures 4 to 8, there is no contact or collision between the robot and the obstacle, and joint angles change smoothly, which ensure the motion stability of robot.The      minimum distance between the robot and the obstacle is always greater than 0.1 m, and the end motion error of robot during this process is very small, close to 0, indicating that the robot can realize the obstacle avoidance task in threedimensional redundant space without affecting the motion of the robot.From Figures 9 to 15, it can be seen that when singularity avoidance strategy is introduced on the basis of obstacle avoidance, the minimum singular value and manipulability of robot are always positive, and the joint angular velocity has decreased compared with Figure 6, and the speed fluctuation is smaller, indicating that the robot has achieved     avoidance of singular configurations during the obstacle avoidance process.At the same time, there is a certain motion error of the robot, which is caused by damping coefficient of avoiding singularity.

In case of obstacle-singularity-joint limit avoidance
In case obstacle-singularity-joint limit avoidance, the simulation results are shown in Figures 16 to 22.
From Figures 16 to 22, it can be seen that under the comprehensive control model of obstacle-singularity-joint limit avoidance, the distance between the robot and the obstacle is always greater than the safe distance, and the robot also avoids singular configuration.The joint limit avoidance strategy reduces the motion range of the robot's joints.However, singularity avoidance and joint avoidance task will lead to motion errors.When adding a joint avoidance limit task based on obstacle-singularity avoidance, the weighted generalized inverse method is adopted to reduce the joint angle change of the robot and avoid the problem of approaching the joint limit.At the same time, the motion error of the robot end further increases, indicating that weighted generalized inverse can lead to end motion error.Regarding motion error, PD control can be considered in the next research to improve motion performance of robot.
Since robot task is performed by controlling joint angles, as long as joint data is obtained for obstacle-singularity-joint limit avoidance, the comprehensive target task    can be achieved.In conclusion, the proposed method is feasible and effective and provides an important foundation for the practical application of redundant robot.

Conclusions
In this article, the four-DOF redundant robot is taken as the research object, and its kinematic model is first established.On the basis of gradient projection method, combined with vector distance method, artificial potential field method, and weighted damping generalized inverse method, the comprehensive control model of obstacle-singularity-joint limit avoidance is established.While implementing the obstacle avoidance task in three-dimensional redundant space, the goal of avoiding singularity and joint limit is also realized.Simulation results show that the robot can realize the obstacle avoidance task in three-dimensional redundant space and can also avoid the problem of reaching singular configuration and joint limit.During the whole control process, no abrupt change of joint angle appeared, ensuring the smooth motion of robot and improving motion performance.However, when the task of singularity-joint limit avoidance is introduced, motion errors is generated.This error can be further compensated later.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Figure 1 .
Figure 1.The structure of SCHUNK robot.

Figure 3 .
Figure 3. Location diagram of robot and obstacle.

Figure 8 .
Figure 8. Minimum distance from obstacle when obstacle avoidance.
In case of obstacle-singularity avoidance, the simulation results are shown in Figures 9 to 15 .

Figure 20 .
Figure 20.Minimum distance from obstacle when singularityjoint limit avoidance.