1. Introduction
Compared with six degree of freedom (DOF) robotic manipulators, 7-DOF robotic manipulators not only ensure motion accuracy of the end-effector (EE), but also optimize other objectives due to the existence of a redundant DOF, such as avoiding obstacles and adapting to human action [
1,
2,
3,
4,
5,
6]. Therefore, redundant manipulators have been widely used in the medical and aerospace fields, etc.
However, 7-DOF manipulators not only improve the flexibility, but also increase the difficulty of solving the inverse kinematics (IK) solution [
7]. Indeed, achieving the 6-DOF pose (position and orientation) given by the EE is equivalent to six equations and seven unknowns, and there are innumerable solutions in theory. However, only one set of the IK solution is needed in robot kinematics control. So far, many scholars have studied the IK solution of redundant manipulators. These methods include geometric method [
8], gradient-projection method (GPM) [
3,
9], weighted least-norm (WLN) method [
10], extended Jacobian matrix method [
11], and analytical method [
12], etc. Some artificial intelligence algorithms are also used in the IK solution of redundant manipulators, such as genetic algorithm [
13], particle swarm optimization algorithm [
14], neural network algorithm [
15].
Geometric algorithms are not universal and their modeling and solving process is complex. The extended Jacobian matrix method can only obtain an approximate IK solution, which is not suitable for robotic manipulators with high accuracy. Analytical algorithm is only applicable to robotic manipulators with specific configurations, or robotic manipulators with some simplified processing [
16,
17]. It takes a long time for intelligent algorithms to solve IK, which is not conducive to real-time control.
The GPM and WLN methods are popular algorithms for solving IK of redundant manipulators, and have the effect of avoiding joint position limits. A weighted GPM [
18] and a clamping WLN method [
19] were proposed for IK of a 7-DOF manipulator. Due to the introduction of damping factors in the singular region, the position errors of the EE are as high as 96.3 mm and 25 mm, respectively, which are not suitable for robotic manipulators with high accuracy requirements. Hu [
20] presented a gradient projection of a weighted Jacobian matrix method for IK of a planar 3-DOF manipulator. However, this method did not solve the problem of motion accuracy reduction caused by joint positions near their limits. Kelemen [
21] introduced an IK algorithm to avoid joint position limits, singularities and obstacles. However, the position error of the EE is as high as 18 mm, and the orientation error is not analyzed. This is not conducive to the further operation of the EE. Jun [
22] proposed an improved clamping WLN method for IK of a redundant manipulator. However, the constant value of the repulsive potential field would lead to the disadvantage of too large or too small repulsive force, which affected the motion accuracy of the EE.
When robotic manipulators move to a Jacobian singular configuration, the Jacobian inverse matrix becomes numerically unrealizable, which is not conducive to the motion control. In [
23,
24,
25], a damped least-squares (DLS) algorithm was used to handle singularities. Although the introduction of damping factors can solve the shortcomings of singular configurations, the damping factors will lead to the decline of the motion accuracy of the EE.
The existing GPM and WLN methods do not completely keep redundant manipulators away from joint position limits and singular configurations, which can reduce the motion accuracy of the EE. Different from traditional redundant manipulator, the redundant manipulators used in the surgical environment require the EE to have high pose accuracy to ensure the smooth progress of the operation. Therefore, based on the advantages of GPM and WLN method, combined with the traditional DLS algorithm, an improved weighted GPM (IWGPM) which introduces a joint limit repulsive potential field function and singular repulsive potential field function as subtasks is proposed. A clamping weighted matrix can make joints stop at their limits, and the introduced joint limit repulsive potential field function generates virtual forces at the damping interval to make joints return to the flexible interval. In the unsafe region, virtual forces generated by the singular repulsive potential field function can make redundant manipulators move away from unsafe region and solve the singular problem thoroughly.
The remainder of this paper is organized as follows: The kinematics of redundant manipulators and the traditional GPM, WLN method, and DLS algorithm are briefly reviewed in
Section 2. The IWGPM is proposed to solve the IK problem of redundant surgical manipulators with avoiding joint position limits and singularities in
Section 3. In
Section 4, to verify and evaluate the effectiveness of the proposed method, simulation results and discussion are performed. Finally, the conclusions are presented in
Section 5.
2. Kinematics Formulations
The forward kinematics is a nonlinear function that describes the relation between the pose of the EE
and joint position
as follows:
The first-order derivation of the function:
describes the velocities from the joint to the EE, where
represents the velocity vector of the EE,
is the velocity vector of joints, and
is a Jacobian matrix.
To obtain a unique solution
, the Jacobian inverse
or pseudo inverse
for non-redundant or redundant manipulators, respectively, is used, as follows [
26]:
for non-redundant manipulators (
m =
n) and:
for redundant manipulators (
m <
n).
It is not difficult to conclude that Equations (3) and (4) hold when
and
exists, and Equation (4) provides a least-norm solution. When robotic manipulators approach a singular configuration,
or
of the manipulators becomes numerically ill conditioned. Furthermore, the vicinity of singular configurations may also cause joint velocities to exceed the corresponding limits. To overcome this drawback, a DLS algorithm [
23,
25] is a widely used approach that sacrifices accuracy of the IK solution to generate an improved Jacobian matrix in the singular region. The DLS algorithm is expressed as:
where
is an identity matrix, and
is a damping factor.
For redundant manipulators, the self-motion can be realized with some subtasks, with not affecting the main task, which can be expressed by GPM [
3]:
where
is the projection operator onto the null space of the matrix
, and
z is a gradient vector of performance criterion as a subtask. The
is the homogeneous solution for self-motion.
Avoidance for joint position limits as a subtask were presented as:
where
and
are the lower and upper limits of the
i-th joint position, and
is the
i-th joint position.
As a result, replace
with
, Equation (6) can be derived further as follows:
where
is a positive scalar coefficient to make the gradient rate of
to be minimized, and
is the gradient vector of
, which is described as:
The WLN method [
10] is also used to avoid joint position limits through weighted factors, and the transformations are introduced as follows:
where
and
are a weighted Jacobian matrix and a weighted joint velocity, respectively. The
is a diagonal and positive weighted matrix, and the
i-th diagonal element is expressed as:
where
is the change rate of
, and
is defined as follows:
where
and
are the lower and upper limits of the
i-th joint position, and
qi is the
i-th joint position.
Figure 1 shows the distributions of
with
. When
is close to
and
,
, this is
. From Equation (12),
tends to zero, the corresponding joint stops at its limit position, but it is not far away from its limit.
Both GPM and WLN method can deal with singular problems, therefore, combining Equations (5) and (8) can be redefined by:
Equation (12) can be rewritten as:
3. Improved Weighted Gradient Projection Method
The WLN method is much more efficient than the GPM one in avoiding joint position limits [
20]. Due to the weighted matrix
, some joints stop at their limits, but this does not keep them away from their limits. Furthermore, on solving singular problems, DLS algorithms can prevent the problem of joint velocities exceeding the corresponding limits, but motion errors will be introduced. More importantly, DLS algorithms cannot guide redundant manipulators away from singular region. These conditions occur suddenly during the operation, which is very unfavorable to patients. Therefore, based on GPM, a joint limit repulsive potential field function and a singular repulsive potential field function are introduced in the null space to solve the shortages of GPM, WLN, and DLS methods.
3.1. Clamping Weighted Matrix and Joint Limit Repulsive Potential Field Function
From
Figure 1, it is easy to find that the starting and ending positions of
are difficult to determine, which sometimes affects the validity of the weighted matrix. Therefore, a buffer is added before the joint position limits, and the whole joint motion interval is divided into damping interval and flexible interval, as shown in
Figure 2. That is a progressive clamping weighted matrix designed as follows:
where
is a smooth function varying from 0 to 1. The
and
are the lower and upper damping thresholds before
and
, respectively:
where
is a positive constant scalar to determine the width of damping interval.
Then, Equation (17) can be rewritten as:
When run in the flexible interval, . While runs in the damping interval, the weighting matrix prevents from approaching its limit. When , the corresponding joints stop moving forever, which will affect motion control and reduce pose accuracy of the EE.
A joint limit repulsive potential field function
is introduced to solve the drawback of Equation (23), and
is also a smooth weighted matrix, when
runs in the flexible interval, the joint limit repulsive potential field function is invalid. On the contrary, when
starts to enter the damping interval, the joint limit repulsive potential field function
comes into play to force the corresponding joints back the flexible interval as far as possible. The
is defined as:
where
is the maximum potential field force, the closer the limit is, the bigger the potential field force. When
goes towards
,
is negative, and
is positive when
goes towards
.
Considering the joint limit repulsive potential field function and combining with GPM, Equation (23) becomes:
where the second part on the right-hand side is a homogeneous solution, which does not affect the main task.
3.2. A Novel DLS Method and Singular Repulsive Potential Field Function
In the traditional DLS algorithm, the damping factor function [
27] is:
The
is the singular region, and the selection of
through trial and error may result in joint velocities exceeding the corresponding limits, so a novel damping function which includes a micro-buffer region
is presented to avoid the joint maximum velocities being exceeded owing to the small selection of
. The novel damping function is defined as:
where
is a positive constant scalar to determine the width of micro-buffer region. In this paper, the single region and micro-buffer region are called unsafe region.
The distributions of
and damped inverse
with singular value is depicted in
Figure 3a,b, respectively. Through
Figure 3b, it can be seen that in the case of no damping, infinite damping inverse will occur at a singular configuration which will result in very high joint velocities.
Figure 3a,b show that the fixed damping value has the same effect in the unsafe region, which is unfair to the micro-buffer region, while the traditional damping function has an effect only in the singular region. However, except for the singular region, the new damping function still has a micro-damping factor in the micro-buffer to prevent the disadvantage that the joint speed exceeds the limit due to the small selection of
. Furthermore, the damping continuity in the singular and micro-buffer regions ensures the continuity of joint velocities.
When solving singular problems, traditional DLS algorithms generate motion errors due to the introduction of damping factor in unsafe region, and it cannot guide robotic manipulators away from unsafe region. It is suitable for the manipulator with low accuracy requirements. However, this paper studies a surgical manipulator, which has very high requirements for pose. Therefore, a singular repulsive potential field function
[
28] is introduced to address the two deficiencies:
where
is a diagonal matrix that contains the maximum torque or force that we allow to be applied to the operator in each spatial dimension. The matrix
is used to direct the wrench away from unsafe region. The
is given as [
29], and
is the distance to
, the
is recommended. It can be observed from
Figure 4 that the change of
in [
] is smooth and continuous.
3.3. Resolution IWGPM
Considering 3.1 and 3.2, and combining with GPM, a novel method called IWGPM is defined as:
We define
, the Equation (30) is represented as:
In Equation (31), when , Equation (25) becomes Equation (23). On the contrary, when is in the damping interval, decreases gradually from 1 to 0, and the corresponding joint velocity also gradually decreases to 0. Meanwhile, increases gradually from 0 to make return to flexible interval. In the safe region, all elements in are zero, indicating that the singular repulsive potential field function does not work. When redundant manipulators are gradually entering the micro-buffer region from the safe region, some elements that cause singularities in increase gradually from 0 to . In the singular region, the function is always . The function has pushed redundant manipulators away from the unsafe region. From Equation (32), it is found that and pick from the null space of do not generate any motion at the EE.
4. Simulation Results and Discussion
In this section, simulations in the paper are implemented with the aid of the MATLAB R2015a tool, and a computer equipped with an Intel Core™ i5-2450M CPU @ 2.50 GHz and 2 GB RAM as the control platform.
A path starts from an initial pose of the EE, , to a desired pose, . The path is divided into M smaller line segments for numerical integration. At any integration step, the joint rates required to move the EE are calculated. Joint velocities are integrated sequentially until the EE reaches the desired pose. Equations (8), (23), (25) and (32) can be realized by an iterative algorithm and further applied to IK solution of redundant manipulators. The iterative algorithm steps are as follows:
Step (1): Assume an initial pose expressed as Euler angles of the EE, .
Step (2): Plan a trajectory from to with M intervals, and assume the running time of the motion, T.
Step (3): Calculate a planned velocity at the interval
k that moves the EE toward
as
where
is a deceleration factor.
Step (4): Compute general equation . Equations (8), (23), (25) and (32) can be substituted the general equation.
Step (5): Calculate
through the following equation:
Step (6): Through Equation (1), the new pose of the EE is obtained.
Step (7): Letting
Step (8): If , where is the accuracy of the actual pose and desired pose of the EE specified by the user.
Return;
Else;
Repeat steps 3 to 6 for .
End.
To make the actual pose of the EE as close to the desired pose as possible, the closed-loop algorithm is used in the IK solution process [
30]. Therefore, Equations (8), (23) and (32) can be represented as:
GPM:
WLN:
IWGPM:
where
is positive feedback gain, The
is tracking error between the desired pose and the actual pose of the EE, which is defined as follows:
where
,
,
,
,
,
. The (
,
,
) and (
,
,
) are desired position and actual position, respectively. The (
,
,
) and (
,
,
) are desired orientation and actual orientation expressed as Euler angles of the EE, respectively.
4.1. Case Study 1
Simulations are provided to demonstrate the validity and practicability of the proposed IWGPM method for IK solutions of the redundant manipulators. The self-developed 7-DOF surgical manipulator with a diameter of 10 mm is taken as the research object. Its structure diagram and coordinate system are shown in
Figure 5a,b.
The DH parameters of manipulator with joint position limit range are shown in
Table 1.
To illustrate the effect of the joint limit repulsive potential field function and singular repulsive potential field function, a straight-line path is selected as the trajectory. Moreover, the manipulator will enter a singular region, and some joints will be near their limit positions. The initial joint position
and final joint position
of the manipulator is set (Note: The final joint position is used to calculate the desired pose of EE, which is to clarify that the joint position is different from that obtained by the proposed IWGPM.), respectively, which determines the initial pose and desired pose expressed as Euler angles of the EE:
and the desired pose is:
For comparison, simulations with traditional GPM and WLN method are also presented. To reflect the coincidence degree of IK solution
and
, the pose accuracy is defined as follows:
where the
,
, and
are the position errors in the
x,
y, and
z directions between the final position and the desired position, respectively. The
,
, and
is orientation error in
,
, and
directions between the final orientation and the desired orientation, respectively. The average deviation
between the final position and the desired position, and the average deviation
between the final orientation and the desired orientation are defined as follows:
To make simulations more convincing, in IWGPM, GPM, and WLN methods, we set , , , , , , T = 10 s, M = 100, .
4.1.1. Simulation Analysis of the Proposed IWGPM
Figure 6 shows the results obtained with the proposed IWGPM, in which the IK solution is:
. The corresponding pose of the EE is
and
, which are very close to
and
. The average position deviation
is 0.113mm and the average orientation deviation
is 0.0387 rad. The pose accuracy of the EE is very high and meets the needs of surgery.
During the operation of the EE of the manipulator from the initial pose to the desired pose,
Figure 6a shows the change curve of joint position. It is indicated that all joints operate within their position limits, and the position change curve of each joint shows continuity and small fluctuation.
Figure 6b,c describe the deviation between the actual pose and the desired pose of the EE. In the initial stage, the actual pose is far from the desired pose. With the operation of time, it is more and more close to the desired pose.
Figure 6d shows that
is in the damping interval when
and
.
Figure 6e indicates that the limit repulsive potential energy function of
produces virtual forces
and
at the same time point, which makes
enter the flexible interval. The joint
is also in the damping interval when
.
Figure 6e also indicates that the limit repulsive potential energy function of
produces virtual forces
at the same time point, which makes
enter the flexible interval.
Figure 6f shows that the manipulator runs in the unsafe region from
to
, and the damping factor is generated during this time period to ensure that joint velocities operate within their limit, as shown in
Figure 6g,i. Meanwhile, the singular potential energy repulsion function generates a virtual force
to make the manipulator enter the safe region at
, as shown in
Figure 6h.
4.1.2. Simulation Analysis of the GPM and WLN Algorithm
Figure 7 and
Figure 8 show the results of the traditional GPM and WLN method. In the two methods,
exceeded its limit at
and
, respectively. It can also be clearly seen from
Figure 8d that
is in the damping interval from
to
and exceeds
from
to the end of operation. When a joint exceeds its position limit, the corresponding joint will stop moving. Furthermore, there is no virtual force to push the joint away from its limit position, so when
exceeds its limit, it remains unchanged, as shown in
Figure 7a and
Figure 8a. It is known that the orientation of the manipulator is mainly controlled by the rear three joints. Therefore, the stop motion of
seriously affects the orientation accuracy of the EE, as shown in
Figure 7c and
Figure 8c.
Figure 7b and
Figure 8b describe the deviation between the actual position and the desired position of the EE. In the initial stage, the actual position is far from the desired position. With the operation of time, it is more and more close to the desired position. According to Equations (41) and (42), for GPM, the average position deviation
is 1.0452 mm and the average orientation deviation
is 0.6058 rad. For WLN method, the average position deviation
is 1.46 mm and the average orientation deviation
is 0.6144 rad. It also shows that the position accuracy of the EE is acceptable, but the orientation accuracy is very low.
Figure 7d and
Figure 8e show that the manipulator runs in the unsafe region from
to
, and the damping value is generated during this time period to ensure that joint velocities operate within their limit, as shown in
Figure 7e,f and
Figure 8f,g, respectively.
In addition,
Figure 7d and
Figure 8e show that the manipulator is always in the unsafe region because of no singular potential energy function, while
Figure 6f shows that the existence of singular potential energy function urges the manipulator to stay away from the unsafe region. i.e., the singular potential energy function introduced in this paper is very effective in solving singular problems.
Table 2 shows that the IK solution obtained by the proposed IWGPM. Compared with the proposed IWGPM, the position accuracy of the traditional GPM in
x,
y and
z directions is reduced by 95.5%, 98.4%, and 82.9%, respectively. The orientation accuracy in
,
and
directions decreased by 94.3%, 97.7%, and 92.3%, respectively. The position accuracy of the traditional WLN in
x,
y and
z directions is reduced by 96.0%, 98.8%, and 89.1%, respectively. The orientation accuracy in
,
and
directions decreased by 93.7%, 98.0%, and 92.6%, respectively. It can be seen that the proposed IWGPM can obtain very high pose accuracy, which fully meets the requirements of surgical accuracy.
4.2. Case Study 2
To observe the influence of joint position limits and singular potential energy function on the motion of the redundant manipulators. In this section, only the pose accuracy of the EE is considered for the simulation test in the following two cases. In case 1, based on the proposed IWGPM, joint position limit is removed and singular repulsive potential energy function is retained, Equation (38) is expressed as:
In case 2, based on the proposed IWGPM, singular repulsive potential energy function is removed and joint position limit is retained, Equation (38) is presented as:
The initial pose, desired pose of the EE and other parameter settings are the same as those in the previous section. The simulations are shown in
Figure 9 and
Figure 10. In the first case, the average position deviation of the EE is 0.6553 mm and the average orientation deviation is 0.3353 rad. Compared with the proposed IWGPM, the average position deviation is reduced by 82.8% and the average orientation deviation is reduced by 88.4%. In the second case, the average position deviation of the EE is 2.5319mm and the average orientation deviation is 0.2547 rad. Compared with the proposed IWGPM, the average position deviation is reduced by 95.5% and the average orientation deviation is reduced by 84.8%. It is not difficult to find that the position and orientation of the EE are affected differently in the two cases. The first case has a great impact on the orientation accuracy, and the second case has a great impact on the position accuracy.
In addition,
Figure 9a shows that
exceeds
from
to
. However,
Figure 10d shows that
is in the damping interval at
. Meanwhile, the virtual force generated by the joint position potential energy function urges
to enter the flexible interval, as shown in
Figure 10a, which shows that the joint position potential energy function is very effective.
Figure 10e,f show that the manipulator is always in the unsafe region from
to
. However,
Figure 9d,e show that the manipulator after
is in the safe region, which shows that the singular potential energy function is very effective. From another point of view, this section verifies that the proposed IWGPM is very effective in solving joint position limits and singularity problems.
5. Conclusions
In this paper, the proposed IWGPM for the IK solution of redundant surgical manipulators is proposed to avoid joint position limits and singularities. The IWGPM introdues a clamping weighted matrix and joint limit repulsive potential field function. The clamping weighting matrix prevents approaching joint position limits, and the joint limit repulsive potential field function belong to the null space of weighted matrix only generates virtual force in the damping interval to make joints return to the flexible interval. Furthermore, a singular repulsive potential field function of belong to the null space of weighted matrix is introduced. When robotic manipulators enter an unsafe region, the singular repulsive potential field function produces an elastic force to drive manipulators back to the safe region. The proposed IWGPM is applied to the 7-DOF redundant surgical manipulator and compared with the traditional GPM and WLN methods. Simulations show that the proposed IWGPM is effective in avoiding joint position limits and singularities, and the pose accuracy is higher than achievable with the traditional GPM and WLN methods.
Furthermore, based on the proposed IWGPM, simulation tests in two cases are carried out. The results show that joint position limits have a great impact on the orientation accuracy, and singular potential energy function has a great impact on the position accuracy. Future work will focus on obstacle avoidance and optimal path planning of redundant surgical manipulators.